directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donovan Du Plessis" <>
Subject [mina] ByteBuffer allocation memory leak
Date Wed, 13 Jul 2005 16:08:14 GMT
Processing multiple xml message requests on multiple socket connections.
Currently we are sending +/- 3000 xml requests per second to your MINA
implementation (IoHandlerAdapter).

When data is read on the socket connection, it is passed to an object
which breaks the data buffer down into individual packets.  These
'packets' are then encoded and written back to the session.

Memory leaking is occurring when a new ByteBuffer is allocated to store
the 'packet'.

e.g. ByteBuffer buffer_ = ByteBuffer.allocate(lengthOfPacket);

We have used a java profiler to monitor the running application, and
found a memory leak is occurring at the allocation point.

Please could you advise us on how to overcome this problem, as the
documentation states that the allocated buffer needs not be released, as
MINA releases is automatically once a call is made to the IoSession
write() method.


View raw message