pmem / llpl

Low Level Persistence Library
Other
98 stars 38 forks source link

Failed to allocate memory of size xxx #7

Closed mggger closed 3 years ago

mggger commented 3 years ago
import com.intel.pmem.llpl.Heap;
import com.intel.pmem.llpl.MemoryBlock;

Heap heap = Heap.createHeap(heapName, 8388608);
MemoryBlock block = heap.allocateMemoryBlock(5242880, false);

It will cause a problem, the error log:

Exception in thread "main" com.intel.pmem.llpl.HeapException: Failed to allocate memory of size 5242880
    at com.intel.pmem.llpl.MemoryAccessor.lambda$new$0(MemoryAccessor.java:63)
    at com.intel.pmem.llpl.MemoryAccessor.<init>(MemoryAccessor.java:75)
    at com.intel.pmem.llpl.AnyMemoryBlock.<init>(AnyMemoryBlock.java:34)
    at com.intel.pmem.llpl.AbstractMemoryBlock.<init>(AbstractMemoryBlock.java:16)
    at com.intel.pmem.llpl.MemoryBlock.<init>(MemoryBlock.java:25)
    at com.intel.pmem.llpl.Heap.allocateMemoryBlock(Heap.java:221)

What are the causes of this error?

Reidddddd commented 2 years ago

I also encountered this issue... Hi @mggger , did you get the answer?