Skip to content

Conversation

@qinsoon
Copy link
Member

@qinsoon qinsoon commented Jan 4, 2023

This PR fixes #730.

  • Alignment offset is now usize rather than isize. We never allow negative values, and it was a mistake to use isize.
  • Seperate alignment padding calculation from align_alloc and get_maximum_aligned_size, update the implementation and add unit tests.
  • get_maximum_aligned_size also requires offset to work properly.
    • The mimalloc allocator (FreeListAllocator) is updated. As we would need to pass around both align and offset, we simply calculate bin once, and pass it around instead.
  • Default value as known_alignment should be VM::ALLOC_END_ALIGNMENT rather than MIN_ALIGNMENT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant