A size_t has a different size depending on the target platform.
#ifdef _WIN64
typedef unsigned __int64 size_t;
#else
typedef _W64 unsigned int size_t;
#endif
When porting 3ds Max to x64, size_t compatibility was forsaken
We chose the following practices for the x64 version of 3ds Max:
- Existing containers would keep their existing limits of 2 and 4 billion entries.
- Existing implementations would down-cast their size_t values to int and unsigned int as required by the interfaces. That
is, an implementation using an STL container and returning a count to the outside world.
- We would not focus on the number of entities, but rather on the total allocated RAM. No explicit support for single entities over 4GB (and in most cases the actual closer to 2GB because of int), but no hard
limit on the total sum.
- If a module uses an appropriate algorithm and can handle vast amounts of data then it can be upgraded to perfect x64 size_t compatability.
The above also applies to a few other major APIs, such as fread and fwrite.