Menu

SAMC21 memory allocator

Vladimir Startsev

SAMC21 memory allocator

The SAMC21 example project contain one local implementation of the "operator new". This implementation is part of the OS abstraction for the SAMC21.
The implementation of the "operator new" uses free (unused) memory for allocation.
This is achieved by "--last=samc21FreeRam" linker option. This option allocated the samc21FreeRam at end of the image. For this reason the memory after this variable is free RAM. The length of the free RAM is calculated as difference between the end of the physical RAM and the address of the samc21FreeRam variable.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.