Open Reidddddd opened 2 years ago
Hello, it looks like you have run of memory on the persistent heap. if you trying to allocate multiple 2MB memory blocks then you may need to increase the heapSize value. Setting the heapSize to 8MB, for example, means the heap will not grow beyond 8MB. You will however get less than 8MB of allocatable memory. This is a characteristic of the underlying memory allocator
Hello,
if you trying to allocate multiple 2MB memory blocks
I was trying allocate one 2MB block
means the heap will not grow beyond 8MB.
Emm, learning from the java docs, I was using the growing heap...
More background: I was writing a UT, and one of method was trying to test a large allocation (this issue, 2MB). And after each method, I would free(false)
the MemoryBlock.
So, my understanding was for each method, the Heap should contain enough memory (at least enough for 2MB), but as the exception pasted...
i wrote a small test on an 8MB growable heap does the following while (true) { mb = allocateMemoryBlock(2MB, false); mb.free(false); }
This will run forever.
perhaps your unit test does not always free the memory block after each test.
I got this exception when I tested HBase, using LLPL. The Heap size was 8MB on my server.
Use growing heap: Heap.createHeap(heapPath, heapSize);
Any hints about where went wrong?