New heap can be equal to heap limit for last chunk

pull/9571/head
deepikabhavnani 2019-02-21 17:20:49 -06:00
parent dab2a30c29
commit 387e4ca9f4
1 changed files with 1 additions and 1 deletions

View File

@ -1249,7 +1249,7 @@ extern "C" WEAK caddr_t _sbrk(int incr)
uint32_t new_heap = heap + incr;
/* __HeapLimit is end of heap section */
if (new_heap >= (uint32_t) &__HeapLimit) {
if (new_heap > (uint32_t) &__HeapLimit) {
errno = ENOMEM;
return (caddr_t) -1;
}