mirror of
https://github.com/corda/corda.git
synced 2025-01-17 10:20:02 +00:00
9bb3d6b972
git-subtree-dir: sgx-jvm/avian git-subtree-mainline:f978eab8d1
git-subtree-split:09e4fe60d0
27 lines
745 B
C++
27 lines
745 B
C++
const unsigned NAME(BootMask) = (~static_cast<unsigned>(0))
|
|
/ NAME(BytesPerWord);
|
|
|
|
const unsigned NAME(BootShift) UNUSED = 32 - avian::util::log(NAME(BytesPerWord));
|
|
|
|
inline unsigned LABEL(codeMapSize)(unsigned codeSize)
|
|
{
|
|
return avian::util::ceilingDivide(codeSize, TargetBitsPerWord)
|
|
* TargetBytesPerWord;
|
|
}
|
|
|
|
inline unsigned LABEL(heapMapSize)(unsigned heapSize)
|
|
{
|
|
return avian::util::ceilingDivide(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;
|
|
}
|
|
}
|