franz1981 edited a comment on issue #2832: ARTEMIS-2482 Large messages could 
leak native ByteBuffers
URL: https://github.com/apache/activemq-artemis/pull/2832#issuecomment-530284944
 
 
   @wy96f Yes and no :)
   They would leak (at first look, but let me take a better look), but they 
just contain wrappers to direct memory that cannot be released (is part of the 
pool). The impact should be way less then `IOUtil` that pool native 
`ByteBuffer`s holding exclusively native memory that won't be reused anymore...
   
   Ideally we shouldn't have *any* thread locals, but we use them for several 
stuff (including the NIO factories and page read/write): I'm planning to 
replaced them by using the Netty pool, because of the difference on how thread 
locals are used. 
   Our thread locals in Artemis just hold memory that cannot be reused if not 
by the same thread, while for Netty, thread locals are just a way to cache 
wrappers that has a very limited impact on GC, while the pool really allows to 
reuse memory where is most needed...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to