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]

free() does not call sbrk()


Hello!

I am just testing my port of the newlib-1.17.0 for our architecture
and came across the following issue:

(1) the newlib libc documentation says that free() invokes sbrk() with
a negative incrementer argument, but a simple debug trace reveals that
sbrk() is actually never called by free().
(2) when malloc()'ing and free()'ing chunks of memory in a loop it
seems that memory is actually never free()'d, which might be due to
(1). instead, the heap keeps on growing.

I guess this is not the intended behavior. Any ideas? Thank you!

Cheers,
Martin


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