News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Help with memory space

Started by czfenix, July 12, 2007, 01:21:09 AM

Previous topic - Next topic

czfenix

Hey, sorry for do this noob question, but you see i am working on a DLL for hook a gameserver game, the thing is this GameServer for load some maps (of game of course) use alot of empty space and 506D8h (hex) bytes between each map, and are in total 2Ch (hex) maps, so its needed alot of space for do this. This memory space its not allocated, its on file of the gameserver...

My question is i want to make my own space for load this maps, i need to know how, caused i try allocate with GlobalAlloc but isnt enough space, i dont know if the API HeapAlloc could fill more space, but in any case, how i can allocate or set on file this ammount of big space?.

thanks very much.

hutch--

czfenix,

Any of the Windows memory allocation strategies will allocate enough memory, I have routinely allocated over 1 gig og memory using GlobalAlloc() so it shouled not be a problem. On win98se you had a limit with OLE memory of about 250 megabyte but that is still a lot of memory.

Just show us how you tried to allocate the memory and we can proably help you.

Don't spec the sizes in HEX as few carry a hex calculator around with them.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Tedd

You will not be able to allocate this in one memory block - it totals over 10GB - so you will have to allocate each map separately, and probably only one at a time. You can save them to files for 'temporary' storage, so you don't need to always keep them in memory.
You might get away dumping the whole lot to one single file, but it must be on a file-system with support for such large files (i.e. ntfs; fat32 will not work.)
No snowflake in an avalanche feels responsible.