Skip to content

Commit

Permalink
Specialize heap small and large chunk implementations (#4366)
Browse files Browse the repository at this point in the history
Prior to this commit, the heap `chunk_t` was generic for both small
and large chunks taking up more space than required for either one.

This commit specializes the small and large chunk structures by
using pointer tagging on the `chunk->m` field to keep track of
the chunk type and large chunk slot/shallow/finaliser and the small
chunk sizeclass. This should in theory improve performance as now
the `large_chunk_t` is 32 bytes and `small_chunk_t` is 36 bytes on
64 bit platforms (while `chunk_t` was previously 44 bytes.

There are no logic changes other than whatever was required to
support the specialization.
  • Loading branch information
dipinhora authored Jul 16, 2023
1 parent 1d7c6d6 commit 4109a91
Show file tree
Hide file tree
Showing 2 changed files with 237 additions and 116 deletions.
Loading

0 comments on commit 4109a91

Please sign in to comment.