Archived

This topic is now archived and is closed to further replies.

Large memory allocation for game app.

This topic is 5153 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, from what I remember in reading the MS documentation in Visual C++, an application, by default, gets one 1 MB of heap memory to use. Now, if I want to have more than 1 MB of heap memory for my application to use, who do I do it? I remember in one part of the VC documentation it said that you can call HeapCreate() to create a large heap to use (one that is larger than 1 MB), and then use HeapAlloc() and HeapFree() to allocate and deallocate memory. Is this a good way to get around the 1 MB heap size limit or is there a better way? Thanks, John

Share this post


Link to post
Share on other sites
i thought it was 1MB of stack space. AFAIK you get unlimited heap space though calls to new/delete whatever.

just write a quick test program and allocate yourself 100MB of memory with a new call, then delete it and exit. i think it should work just fine.

i''m 99% certain i use way more than 1MB of heap in my game.

-me

Share this post


Link to post
Share on other sites
That's only the default heap. Generally you don't need to worry about it. You can read more about heap management in old article at msdn. Most of it still applies in current versions of windows.

Edit:
Messed up the link

[edited by - fredizzimo on November 5, 2003 8:09:31 PM]

Share this post


Link to post
Share on other sites