mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
e505cbe99d
This commit fixes a lot of bugs. All tests are now pass for Linux x86_64 to Linux i386 cross builds.
31 lines
735 B
C++
31 lines
735 B
C++
const unsigned NAME(BootMask) = (~static_cast<unsigned>(0))
|
|
/ NAME(BytesPerWord);
|
|
|
|
const unsigned NAME(BootShift) = 32 - log(NAME(BytesPerWord));
|
|
|
|
const unsigned NAME(BootFlatConstant) = 1 << NAME(BootShift);
|
|
const unsigned NAME(BootHeapOffset) = 1 << (NAME(BootShift) + 1);
|
|
|
|
inline unsigned
|
|
LABEL(codeMapSize)(unsigned codeSize)
|
|
{
|
|
return ceiling(codeSize, TargetBitsPerWord) * TargetBytesPerWord;
|
|
}
|
|
|
|
inline unsigned
|
|
LABEL(heapMapSize)(unsigned heapSize)
|
|
{
|
|
return ceiling(heapSize, TargetBitsPerWord * TargetBytesPerWord)
|
|
* TargetBytesPerWord;
|
|
}
|
|
|
|
inline object
|
|
LABEL(bootObject)(LABEL(uintptr_t)* heap, unsigned offset)
|
|
{
|
|
if (offset) {
|
|
return reinterpret_cast<object>(heap + offset - 1);
|
|
} else {
|
|
return 0;
|
|
}
|
|
}
|