[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: How to best solve fragmentation issues
- From: "Jens Andersson" <lists@...>
- Date: Wed, 20 Feb 2008 20:30:28 +0100
I've integrated LUA into a Nintendo DS project and are starting to run into
problems with memory fragmentation. In my application I load some very large
images where I need big continuous blocks of memory from the ~3Mb I have
available. LUA's dynamic memory allocation seems to be one of the
troublemakers. I found the lua-functions where I can specify my own
allocation routines and my current thinking is that I could make LUA use a
separate heap. I'm not really looking forward to implement a separate
memory-manager, but this way the LUA allocations won't interfere with the
rest of the memory.
Is there a better way to solve this?