We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f907012 commit a47bf45Copy full SHA for a47bf45
platform/mbed_retarget.cpp
@@ -770,7 +770,8 @@ extern "C" caddr_t _sbrk(int incr) {
770
#else
771
// Linker defined symbol used by _sbrk to indicate where heap should start.
772
extern "C" uint32_t __end__;
773
-extern "C" caddr_t _sbrk(int incr) {
+// Weak attribute allows user to override, e.g. to use external RAM for dynamic memory.
774
+extern "C" WEAK caddr_t _sbrk(int incr) {
775
static unsigned char* heap = (unsigned char*)&__end__;
776
unsigned char* prev_heap = heap;
777
unsigned char* new_heap = heap + incr;
0 commit comments