Query: mem_temp_alloc 8 bytes alignment of size
sujankh opened this issue · comments
Sujan Khadka commented
Hi, when looking at the the bump allocator i was assuming the following would modify size to be the next multiple of 8 but looks like it is not.
size = ((size >> 3) + 7) << 3; // allign to 8 bytes
Line 49 in ecf1e63
Here is what i see when i add some logs
size: 16 --> becomes: 72
size: 4224 --> becomes: 4280
When user request 16 bytes, do we need to reserve 72 bytes in the temp? We could just reserve 16 bytes right?
Dominic Szablewski commented
Good catch, thanks!