This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: extend dl-minimal malloc implementation

IMHO using malloc/free in should be considered as a way to avoid
using the stack for allocations; but this means that we have to be
careful to free everything we malloc, so that at the time we hand off
malloc to's malloc, the size of the "free list" is as small as
possible, which makes some of this discussion, well, "more moot" ;-)

At least, that was my design intent - the free list would normally
be small enough to not worry about, and anything left malloc'd at
handover would remain malloc'd for the life of the process.

If we intend to make's heap compatible with's heap, I
think the only long term solution, for maintenance reasons, is to use
malloc/malloc.c et all to implement both, perhaps via some #include/cpp
magic that gives us a stripped-down-but-compatible[*] version of the
full malloc just for

[*] for example, without tcache/fastbins/consolidate but handing off a
heap that can be consolidated later, but remains compatible with future
hardening changes.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]