I discovered that dropbear, especially when using libz for
compression/decompression, causes memory fragmentation in uClinux - to the
point that the system doesn't have enough contiguous memory to continue to
function after ~24 hours.  This will be a problem for any system that
doesn't have an MMU.  Normally, programs specifically targeted for uClinux
will allocate all memory statically and the program itself will load execute
in place (EIP) from a romfs.

Thankfully, dropbear has wrapper functions for malloc and related calls that
can easily be replaced globally.  I have integated the bget memory manager
with dropbear.  Dropbear will initially get a large chunk of system memory,
then all future memory allocations are handled by bget, resulting in no
system memory fragmentation.  I also use bget for libtommath and
libtomcrypt.  I'm posting this to see if there is any interest in a patch
with bget integration.  If not, this e-mail can serve as a search result for
someone to make a request in the future.

Farrell

Reply via email to