1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Made 32-bit span TCGetSpanAt match 64-bit (no span inclusion check)

This commit is contained in:
Brian Fiete 2019-12-21 05:49:37 -08:00
parent d0e8332150
commit 9aebffa954

View file

@ -684,12 +684,12 @@ static tcmalloc_obj::Span* TCGetSpanAt(void* addr)
if (rootLeaf == NULL)
return NULL;
auto span = (tcmalloc_obj::Span*)rootLeaf->values[checkLeafIdx];
intptr pageSize = (intptr)1 << kPageShift;
int spanSize = pageSize * span->length;
void* spanStart = (void*)((intptr)span->start << kPageShift);
void* spanEnd = (void*)((intptr)spanStart + spanSize);
if ((addr >= spanStart) && (addr < spanEnd))
return span;
// intptr pageSize = (intptr)1 << kPageShift;
// int spanSize = pageSize * span->length;
// void* spanStart = (void*)((intptr)span->start << kPageShift);
// void* spanEnd = (void*)((intptr)spanStart + spanSize);
// if ((addr >= spanStart) && (addr < spanEnd))
// return span;
return span;
}
#else