As Boyapati, Anitha wrote: > Ok. I got it. The issue is talking about the case when all the free > *heap* (or 'cake' as you put it) is exhausted; but has a malloc'ed & > free'd chunk (or realloc'ed) at the end in which case the 'top > address'(?) should be allowed to move backwards.
Yes, that's the issue here. As the top address (__brkval) never moves back, the free space maintained by the freelist and the "cake" above the top address are not considered to be adjacent, so if a new request could not be satisfied from the freelist, the entire request will be obtained from space beyond the current top where extending the current top would have sufficed. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev