MCPcopy Create free account
hub / github.com/LUX-Core/lux / allocMemory

Method allocMemory

src/crypto/RandomX/allocator.cpp:38–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36
37 template<size_t alignment>
38 void* AlignedAllocator<alignment>::allocMemory(size_t count) {
39 void *mem = rx_aligned_alloc(count, alignment);
40 if (mem == nullptr)
41 throw std::bad_alloc();
42 return mem;
43 }
44
45 template<size_t alignment>
46 void AlignedAllocator<alignment>::freeMemory(void* ptr, size_t count) {

Callers

nothing calls this directly

Calls 2

rx_aligned_allocFunction · 0.85
allocLargePagesMemoryFunction · 0.85

Tested by

no test coverage detected