I run my sample program using Bigmemory with parameter: -XX:MaxDirectMemorySize=512m, but I can't create OffHeapStore greater than 183 MB (otherwise I am receiving OOME). I am using IBM Java VM.
>java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pwi3260_26sr1-20111114_01(SR1))
IBM J9 VM (build 2.6, JRE 1.6.0 Windows XP x86-32 20111113_94967 (JIT enabled, A
OT enabled)
J9VM - R26_Java626_SR1_20111113_1649_B94967
JIT - r11_20111028_21230
GC - R26_Java626_SR1_20111113_1649_B94967
J9CL - 20111113_94967)
JCL - 20111112_01
Can you explain what you are trying to do. Are you using the new BigMemory Go project. Are you using the Server Array. Why are you only allocating 512MB of space - Why not use the heap instead ?
Yes, I think it is related to 32-bit VM and different behavior of IBM VM.
Oracle 32-bit VM has no problem with creating eg. 500MB offheap cache with MaxDirectMemorySize=1024m
NOTE: Direct Memory and Off-heap Memory Allocations
To accommodate server communications layer requirements, the value of maxDirectMemorySize must be greater than the value of maxBytesLocalOffHeap. The exact amount greater depends upon the size of maxBytesLocalOffHeap. The minimum is 256MB, but if you allocate 1GB more to the maxDirectMemorySize, it will certainly be sufficient. The server will only use what it needs and the rest will remain available.