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:
parent
d0e8332150
commit
9aebffa954
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue