Skip to content

Commit 387e4ca

Browse files
author
deepikabhavnani
committed
New heap can be equal to heap limit for last chunk
1 parent dab2a30 commit 387e4ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform/mbed_retarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ extern "C" WEAK caddr_t _sbrk(int incr)
12491249
uint32_t new_heap = heap + incr;
12501250

12511251
/* __HeapLimit is end of heap section */
1252-
if (new_heap >= (uint32_t) &__HeapLimit) {
1252+
if (new_heap > (uint32_t) &__HeapLimit) {
12531253
errno = ENOMEM;
12541254
return (caddr_t) -1;
12551255
}

0 commit comments

Comments
 (0)