Hello laugh
If I try to load a big map twice my game crashes with a message:
"Out of memory"
I tried everything with nexus and so on but it wont simply work, so I decided finally to debug my game...
I traced some calls and came to this function:
Code:
10040B90



This function allocates memory for everything in my game (maps, models, strings, vars, and so on...)
It uses another function (the first call) which uses HeapAlloc.
I noticed when Im loading my map twice that this function returns an empty EAX/ESI which is normally the address where the map would be extracted and loaded, so the next JE condition is false and we wont jump past the error message "Out of memory". I forced the jump to jump and tried some different memory addresses for ESI, and yeah it worked. But I cant handle that without a debugger, because my hooks will make everything more unstable as it is now.
So, I read on the internet why the hell HeapAlloc can fail, and people said I should use VirtualAlloc instead of HeapAlloc for bigger files. It would be awesome if you could increase the size of the heap or use VirtualAlloc so I can load some larger maps with alot of models preloaded for my firstperson view. Thanks!

Last edited by Ch40zzC0d3r; 01/31/14 09:40.