mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +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)
|
if (rootLeaf == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
auto span = (tcmalloc_obj::Span*)rootLeaf->values[checkLeafIdx];
|
auto span = (tcmalloc_obj::Span*)rootLeaf->values[checkLeafIdx];
|
||||||
intptr pageSize = (intptr)1 << kPageShift;
|
// intptr pageSize = (intptr)1 << kPageShift;
|
||||||
int spanSize = pageSize * span->length;
|
// int spanSize = pageSize * span->length;
|
||||||
void* spanStart = (void*)((intptr)span->start << kPageShift);
|
// void* spanStart = (void*)((intptr)span->start << kPageShift);
|
||||||
void* spanEnd = (void*)((intptr)spanStart + spanSize);
|
// void* spanEnd = (void*)((intptr)spanStart + spanSize);
|
||||||
if ((addr >= spanStart) && (addr < spanEnd))
|
// if ((addr >= spanStart) && (addr < spanEnd))
|
||||||
return span;
|
// return span;
|
||||||
return span;
|
return span;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue