Jump to content
  • Advertisement

Archived

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

LeoMaheo

Checking the amount of free memory (GBA)

This topic is 5796 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

Is there some way to get to know how much memory that is available in EWRAM or IWRAM in the middle of a program ? I know it''s 256/32 at startup, but when you''ve run the program for a while, how can you tell how much that is left ?? That could be really usefull to detect memory leaks !! I tried this: allocator byte_alloc; dprintf( "%i", byte_alloc.max_size() ); but max_size() just returned -1. Why ?? Does anyone know what to do ? By the way, what is a ''ctour'' and a ''dtour'' ?? They are mentioned sometimes and I have no clue !!

Share this post


Link to post
Share on other sites
Advertisement
Well, actually I wrote:

allocator < char > byte_alloc

but the '' < '' and '' > '' (smaller than and larger than) seem to have vanished

Share this post


Link to post
Share on other sites
None seems to know or care...
But now I know how to do ! I read about it at:

http://www.flipcode.com/tutorials/tut_memleak.shtml

( you just overload ''new'' and ''delete'' and then store all allocations in a map, you can use the macros __LINE__ and __FILE__ to trace where things were allocated (and pass them to ''new'') and sometimes ju just dump all allocated things on a debug console )

Share this post


Link to post
Share on other sites
ctor and dtor are acronyms for "c onstructor " and "d estructor "

[edited by - darookie on August 10, 2002 6:28:06 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!