HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How does war3 allocate memory

05-18-2009, 02:19 AM#1
Feroc1ty
How does warcraft 3 allocate memory when you have an array, that has a defined size and also an undefined size. I heard someone mention that memory is allocated in powers of 2, ex if you use index of 300 in an array, there would be 4*512 bytes allocated, so memory of 0-511 indexes would be used, even if you don't actually set values to them, or was the person wrong? If he was, please explain exactly how it's done.
05-18-2009, 07:45 AM#2
PipeDream
That is correct. I reversed that stuff pretty thoroughly, though it's been a couple years. There are Cheat("") commands in war3err to print the array size you can use to investigate yourself.
05-18-2009, 02:13 PM#3
Feroc1ty
Thanks, +rep.