[uCsimm] Re: [uClinux-dev] uC-libc malloc-simple memory leak patch

From: David McCullough (davidm@lineo.com)
Date: Fri May 04 2001 - 00:26:04 EDT


Jivin David Beckemeyer lays it down ...
>
> A while back I posted a replacement malloc/free implementation
> that fixed an issues with a memory leak on m68k uClinux (don't
> know if the same problem exists on other platforms).

Could you forward the details of the memory leak ?
The reason I ask is that the malloc-simple library does nothing, it relies
on the kernel memory allocator (via mmap) to do all the work. This makes
the implementation very small.

So a bug in malloc-simple should equate to a bug in either mmap or the
kernel allocator (or perhaps gross fragmentation of kernel memory is what
you were actually seeing).

I have not noticed any bug in the kernel/mmap area for a long time :-)

> That module wasn't integrated with the uC-libc sources and
> required manual replacement in the libc.a library with ar.
>
> Attached to this message is a diff for the malloc-simple/alloc.c
> file which integrates the fix into the uC-libc source build.
>
> Two files are attached, 'alloc.c.diffs' contains the diffs to
> alloc.c and 'memory.h' is a new header file required by the fix.

What you have done here is provide a different malloc implementation.
It would probably better packaged as such as a lot of people will want to
keep malloc-simple just like it is for size and simplicity :-)

Something like Yet another Uclibc Malloc (YUM ;-)

Cheers,
Davidm

-- 
David McCullough:  Ph: +61 7 3435 2815  Lineo (The Embedded Solutions Company)
davidm@lineo.com   Fx: +61 7 3891 3630  PO Box 925, Kenmore QLD 4069, Australia
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:43 EST