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
If we give it an unaligned size, then it will align it, and then memory will
seem non-contiguous. That is, if we sbrk 4 bytes from address 0 then it
returns 0 (the start of the allocation), and logically we reserved the range
0-4. Our next sbrk of any amount will return 8, because sbrk aligns up the
address to multiples of 8. So it seems like we have a region 0-4 and another
8-. Because of this emmalloc would generate separate root regions for
them, that is, they would not get merged because of the 4 bytes of dead
space in the middle.
With this PR, the amount of new regions created in
test_emmalloc_memvalidate_verbose goes from 1311 to 1234. I'm not sure
if it's worth testing that, as it would make updating the test difficult, and this
is such an internal detail of emmalloc.
Also add some verbose logging that helps debug this.
Noticed in #20704 (comment)
0 commit comments