You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the last chunk in the free list is smaller than requested, nano_malloc() calls srbk(0) to see if the heap's current head is adjacent to this chunk, and if so it asks srbk() for the difference in bytes only and expands the current chunk.
This doesn't work if the heap consists of non-contiguous regions. srbk(0) returns the the current region's head if the latter has any remaining capacity. But if this capacity is not enough for the second (non-trivial) call to srbk() described above, allocation will happen from the next region if available. Expanding the current chunk won't work and will result in a segmentation fault.
No description provided.
The text was updated successfully, but these errors were encountered: