Squalr / Squalr

Squalr Memory Editor - Game Hacking Tool Written in C#

Home Page:https://www.squalr.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Revisit Region Sizes

zcanann opened this issue · comments

A (reasonable) limitation of C# is that Byte[] can only be of size 2,147,483,591 (0x7FFFFFC7) elements (see: https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element)

Unfortunately, it is quite possible in a 64 bit process to exceed this. To get around this, we limit regions to 2,000,000,000 bytes by splitting them.

Naturally, it makes sense to have all region size variables be of Int32 since C# cannot exceed this limit. However, this can be annoying when using region sizes for values larger than this.

Known bugs this causes:
In Memory.cs for 64 bit allocations where region sizes for unallocated bounds must be cast to Int32.
Module sizes > 2GB will likely have issues, although I'm not sure if this exists