Fixed secure JIT on Linux and code cleanup.
This commit is contained in:
parent
497863441a
commit
775867fc3e
8 changed files with 62 additions and 54 deletions
|
@ -61,10 +61,11 @@ namespace randomx {
|
|||
|
||||
template<class Allocator>
|
||||
void deallocCache(randomx_cache* cache) {
|
||||
if (cache->memory != nullptr)
|
||||
if (cache->memory != nullptr) {
|
||||
Allocator::freeMemory(cache->memory, RANDOMX_CACHE_MAX_SIZE);
|
||||
if (cache->jit != nullptr)
|
||||
delete cache->jit;
|
||||
}
|
||||
|
||||
delete cache->jit;
|
||||
}
|
||||
|
||||
template void deallocCache<DefaultAllocator>(randomx_cache* cache);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue