Store a full pointer in the Metaslab

This improves the codegen.
This commit is contained in:
Matthew Parkinson
2019-11-19 17:55:51 +00:00
parent cb4b8fa545
commit efd5228da6
5 changed files with 45 additions and 55 deletions

View File

@@ -153,8 +153,8 @@ namespace snmalloc
return p = (void*)((uintptr_t)p & mask);
}
SNMALLOC_FAST_PATH static uint16_t
remove_cache_friendly_offset(uint16_t relative, sizeclass_t sizeclass)
SNMALLOC_FAST_PATH static uintptr_t
remove_cache_friendly_offset(uintptr_t relative, sizeclass_t sizeclass)
{
size_t mask = sizeclass_to_inverse_cache_friendly_mask(sizeclass);
return relative & mask;
@@ -167,8 +167,8 @@ namespace snmalloc
return p;
}
SNMALLOC_FAST_PATH static uint16_t
remove_cache_friendly_offset(uint16_t relative, sizeclass_t sizeclass)
SNMALLOC_FAST_PATH static uintptr_t
remove_cache_friendly_offset(uintptr_t relative, sizeclass_t sizeclass)
{
UNUSED(sizeclass);
return relative;