2008-08-28 02:16:04     Memory fragment problem.

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2008-08-28 02:16:04     Memory fragment problem.

Wei Jiang (CHINA)

Message: 61221   


Hi all,


   I used many libs in my application, like SDL, SDL_image, Sqlite, jpeg...


   These libs used amount of "malloc and free". And it seems a huge strike to my memory. After running for a long time, I got a memory allocation problem but I can see there are more than 5M free memory using the "free" command.


   Maybe there are too many fragments in the memory after running for a long period. then what should I do when in the face of the many "malloc and free" in the libs?


   Please give me some advices. Thanks a lot.


                  Wei Jiang




2008-08-28 02:33:55     Re: Memory fragment problem.

Sonic Zhang (CHINA)

Message: 61223   


Either allocate all required memory at the beginning of your applcation or add more SDRAM to your system.