I believe NIO buffer does use direct buffer memory, right? Actually i got
Out of direct buffer memory exception. BTW, my physical memory is 4G.

2007/4/24, Niklas Therning <[EMAIL PROTECTED]>:

mat wrote:
> Hi folks,
>
> Out of direct buffer memory exception occured again. I already did
>      ByteBuffer.setUseDirectBuffers(false);  // Direct buffers perform
> bad.
>      ByteBuffer.setAllocator(new SimpleByteBufferAllocator()); //
> Disables
> pooling.
>
> Why still get this exception? Should I still
> increasing maximum direct memory size using -XX:MaxDirectMemorySize
> option (
> e.g. -XX:MaxDirectMemorySize=128M)
>
> what is the suggestion of the value(MaxDirectMemorySize)? I also setup
> java
> -Xms500M -Xmx1g
>
How much memory do you have in total? If -Xmx + -XX:MaxDirectMemorySize
> physical memory in your machine I guess you could get an OutOfMemory
because of that.

If MINA isn't using direct memory and you aren't either in any of your
code you shouldn't have to specify MaxDirectMemorySize.

--
Niklas Therning
www.spamdrain.net


Reply via email to