alloc: de-static external_pointer
Like alloc_size, this will require amplification internally. This patch also restores performance to the status quo ante; Clang can once again see enough to generate the same code as it did before de-static-ing alloc_size.
This commit is contained in:
committed by
Matthew Parkinson
parent
1042fc908a
commit
f295a3f191
@@ -27,7 +27,7 @@ extern "C"
|
||||
void SNMALLOC_NAME_MANGLE(check_start)(void* ptr)
|
||||
{
|
||||
#if !defined(NDEBUG) && !defined(SNMALLOC_PASS_THROUGH)
|
||||
if (Alloc::external_pointer<Start>(ptr) != ptr)
|
||||
if (ThreadAlloc::get_noncachable()->external_pointer<Start>(ptr) != ptr)
|
||||
{
|
||||
error("Using pointer that is not to the start of an allocation");
|
||||
}
|
||||
@@ -38,7 +38,7 @@ extern "C"
|
||||
|
||||
SNMALLOC_EXPORT void* SNMALLOC_NAME_MANGLE(__malloc_end_pointer)(void* ptr)
|
||||
{
|
||||
return Alloc::external_pointer<OnePastEnd>(ptr);
|
||||
return ThreadAlloc::get_noncachable()->external_pointer<OnePastEnd>(ptr);
|
||||
}
|
||||
|
||||
SNMALLOC_EXPORT void* SNMALLOC_NAME_MANGLE(malloc)(size_t size)
|
||||
|
||||
Reference in New Issue
Block a user