-
Notifications
You must be signed in to change notification settings - Fork 222
Questions about heap(s) #417
Comments
Custom heap is, as the name implies custom to a particular firmware build. It is available to the native code implementation, and not used by the CLR. NETMF was designed at a time when the C++ runtime libraries for Micro Controllers tended to pull in the world, so it has options to handle most of the basics of a C runtime library with as little overhead as possible. |
@smaillet-ms just to be 100% sure that I understood you correctly: this region would be the equivalent to the a regular heap region of a "non-NETMF" C/C++ solution. Is this correct? |
Pretty much, yes. NETMF was designed at a time when embedded C runtimes were pretty FAT. (newlib-nano and other such micro controller bare-metal focused run-times did not exist. ) Thus it uses its own implementations for the subset of standard runtime functionality it needs. Fast forward to the year 2015 and it's a different world... Part of the HAL/PAL refactoring conversation includes leveraging existing runtime support libraries and deprecating custom implementations. |
👍 |
- remove references to SimpleHeap projects - remove calls to SimpleHeap config and init - remove Simple Heap declarations from TinyHal.h - replace private_malloc and private_free with standard C malloc and free - implement redirect functions for private_malloc and private_free because they were being referenced from the pre-compiled crypto libs - rework scatter files to have a managed heap and standard heap that are managed from C standard code
Looking at the scatterfiles it seems that two heap regions exist.
One referred as heap, that I understand its the one managed by the CLR, correct?
And there is a "custom heap" who's purpose is unclear to me. Could someone please explain it to me?
The text was updated successfully, but these errors were encountered: