diff options
Diffstat (limited to 'src/jit/hostallocator.cpp')
-rw-r--r-- | src/jit/hostallocator.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/jit/hostallocator.cpp b/src/jit/hostallocator.cpp index b737424ee8..c9afd1a2bc 100644 --- a/src/jit/hostallocator.cpp +++ b/src/jit/hostallocator.cpp @@ -5,36 +5,14 @@ #include "jitpch.h" #include "hostallocator.h" -HostAllocator HostAllocator::s_hostAllocator; - -void* HostAllocator::Alloc(size_t size) +void* HostAllocator::allocateHostMemory(size_t size) { assert(g_jitHost != nullptr); return g_jitHost->allocateMemory(size, false); } -void* HostAllocator::ArrayAlloc(size_t elemSize, size_t numElems) -{ - assert(g_jitHost != nullptr); - - ClrSafeInt<size_t> safeElemSize(elemSize); - ClrSafeInt<size_t> safeNumElems(numElems); - ClrSafeInt<size_t> size = safeElemSize * safeNumElems; - if (size.IsOverflow()) - { - return nullptr; - } - - return g_jitHost->allocateMemory(size.Value(), false); -} - -void HostAllocator::Free(void* p) +void HostAllocator::freeHostMemory(void* p) { assert(g_jitHost != nullptr); g_jitHost->freeMemory(p, false); } - -HostAllocator* HostAllocator::getHostAllocator() -{ - return &s_hostAllocator; -} |