摘要: Monday, 26 August 2013Lock-Based vs Lock-Free Concurrent AlgorithmsLast week I attended a review session of the newJSR166StampedLockrun byHeinz Kabutzat the excellentJCreteunconference. StampedLock is an attempt to address the contention issues that arise in a system when multiple readers concurrent 阅读全文
posted @ 2014-03-14 15:41 tree.liang 阅读(283) 评论(0) 推荐(0) 编辑
摘要: Netty 4 内存管理:sun.misc.Cleaner 阅读全文
posted @ 2014-03-14 15:26 tree.liang 阅读(820) 评论(0) 推荐(0) 编辑
摘要: 参考sun.misc.Unsafe的源码sun.misc.Unsafe的APIJava Magic. Part 4: sun.misc.UnsafeNetty4 可以利用Unsafe来提高内存读写性能(作为可选项,如果系统参数io.netty.noUnsafe为true且JDK支持的话)。Unsafe不能直接使用(在java.nio.Bits中是// -- Unsafe access -- private static final Unsafe unsafe = Unsafe.getUnsafe();假如我们代码中也这样直接使用的话,会抛出异常java.lang.SecurityExce... 阅读全文
posted @ 2014-03-14 15:24 tree.liang 阅读(2994) 评论(0) 推荐(1) 编辑