mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Calling convention fix (only triggered in Win32)
This commit is contained in:
parent
470cf589ce
commit
accc74957a
1 changed files with 6 additions and 3 deletions
|
@ -127,7 +127,10 @@ void BFGC::RawMarkSpan(tcmalloc_raw::Span* span, int expectedStartPage)
|
|||
extraDataSize += (1 + stackTraceCount) * sizeof(intptr);
|
||||
}
|
||||
|
||||
typedef void(*MarkFunc)(void*);
|
||||
struct MarkTarget
|
||||
{
|
||||
};
|
||||
typedef void(MarkTarget::*MarkFunc)();
|
||||
MarkFunc markFunc = *(MarkFunc*)&rawAllocData->mMarkFunc;
|
||||
|
||||
// It's possible we can overestimate elemCount, particularly for large allocations. This doesn't cause a problem
|
||||
|
@ -136,8 +139,8 @@ void BFGC::RawMarkSpan(tcmalloc_raw::Span* span, int expectedStartPage)
|
|||
intptr dataSize = elementSize - extraDataSize;
|
||||
intptr elemCount = dataSize / elemStride;
|
||||
for (intptr elemIdx = 0; elemIdx < elemCount; elemIdx++)
|
||||
{
|
||||
markFunc((uint8*)spanPtr + elemIdx * elemStride);
|
||||
{
|
||||
(((MarkTarget*)((uint8*)spanPtr + elemIdx * elemStride))->*markFunc)();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue