[riot-notifications] [RIOT-OS/RIOT] sys/shell: add heap command (#10953)

Gunar Schorcht notifications at github.com
Mon Apr 15 11:37:24 CEST 2019

> `malloc 10` reduces heap by 16 and then `malloc 20` by 32, looks like HEX to me

Ok, it seems to be HEX for you but it isn't :wink:

There is some overhead for chunk management structures that decreases the heap. For example, if you use `malloc 1000`, you will see that the heap decreases by 1.008 bytes. The additional 8 bytes are the pointer to the chunk plus its size. The size of the overhead can differ since it makes a difference whether `malloc` has to allocate a new chunk of bigger size or just a block inside an existing chunk.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190415/ff59b6ad/attachment.html>

More information about the notifications mailing list