netty5/buffer/src
Norman Maurer 858de5699b [#2924] Correctly update head in MemoryRegionCache.trim()
Motivation:
When MemoryRegionCache.trim() is called, some unused cache entries will be freed (started from head). However, in MeoryRegionCache.trim() the head is not updated, which make entry list's head point to an entry whose chunk is null now and following allocate of MeoryRegionCache will return false immediately.

In other word, cache is no longer usable once trim happen.

Modifications:

Update head to correct idx after free entries in trim().

Result:

MemoryRegionCache behaves correctly even after calling trim().
2014-09-22 11:04:21 +02:00
..
main/java/io/netty/buffer [#2924] Correctly update head in MemoryRegionCache.trim() 2014-09-22 11:04:21 +02:00
test/java/io/netty/buffer [#2843] Add test-case to show correct behavior of ByteBuf.refCnt() and ByteBuf.release(...) 2014-09-01 08:50:21 +02:00