This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: [PATCH] malloc on top to consider already available memory


On czw, 2016-02-18 at 09:09 +0100, Petter Ãsterlund wrote:
> For my case nano-malloc is not what I use but going to dlmalloc 2.8
> seems reasonable and possibly even consume a bit less global malloc
> state RAM (by the look of the code). Version 2.8 also comes with
> support of malloc spaces which could be useful in some cases to
> handle
> fragmentation issues e.g. I guess there is a bit of work to get the
> newlib special #ifdefs and defines to support e.g. reent.

It would be very nice to have the most recent dlmalloc in newlib! I can
help you with that or I may try to integrate it myself. I think that
all newlib-specific additions should be somehow marked and possibly
grouped, to make all future updates of this code easier. Sth like

--- >8 --- >8 --- >8 --- >8 --- >8 ---

... beginning of original dlmalloc code

// ============== NEWLIB BEGIN ==============

... newlib specific defines, includes, whatever...

// ============== NEWLIB END ==============

... rest of original dlmalloc code

--- >8 --- >8 --- >8 --- >8 --- >8 ---

Assuming that it would be possible to do it that way... I was thinking
about that some time ago and tried to compare newlib to original
dlmalloc code (different versions), but it seems that the codebases
diverged significantly...

Corina mentionedÂjemalloc and ptmalloc3, but from what I read yesterday
I think that these may be a bit too heavy for newlib if it would be
used for a microcontroller... On the other hand newlib-nano is not
really an option for me as it is single-threaded...

Regards,
FCh


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