E.g. for a block starting at 0x10000 and ending at 0x20000, with the cell size of 8, the free list is like below:
0x1fff8 -> 0x1fff0 -> 0x1ffe8 -> ... -> 0x10000
So when we allocate, we will get the high address cell first, then the low address cell. I am not sure if this would cause any issue. But clearly we cannot assume that in two consecutively allocated objects, the second object has a higher address than the first object.
When we allocate a new block or sweep a block, the free list for the block points to the last cell. https://github.com/mmtk/mmtk-core/blob/6cae51c40104d84bb74598ab3eba4f9ef8173e8e/src/util/alloc/free_list_allocator.rs#L360 https://github.com/mmtk/mmtk-core/blob/6cae51c40104d84bb74598ab3eba4f9ef8173e8e/src/policy/marksweepspace/native_ms/block.rs#L305
E.g. for a block starting at
0x10000
and ending at0x20000
, with the cell size of 8, the free list is like below:0x1fff8
->0x1fff0
->0x1ffe8
-> ... ->0x10000
So when we allocate, we will get the high address cell first, then the low address cell. I am not sure if this would cause any issue. But clearly we cannot assume that in two consecutively allocated objects, the second object has a higher address than the first object.