Merge pull request #1942 from cohcho/fix_mem_align

MemoryPool: fix alignment modification
This commit is contained in:
xmrig 2020-11-11 00:29:26 +07:00 committed by GitHub
commit 837bd1a43c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,7 @@ uint8_t *xmrig::MemoryPool::get(size_t size, uint32_t)
{ {
assert(!(size % pageSize)); assert(!(size % pageSize));
if (!m_memory || (m_memory->size() - m_offset) < size) { if (!m_memory || (m_memory->size() - m_offset - m_alignOffset) < size) {
return nullptr; return nullptr;
} }