作者: folklore 时间: 2012-12-18 18:53 @tedcy
free并不一定马上调用内核的free将内存释放。
它在等你再次malloc,算是应用层的内存池作者: tedcy 时间: 2012-12-18 18:57
@folklore
请教一下,它一般在什么情况才真正释放。
或者,这个特性可以选择性关闭吗?作者: folklore 时间: 2012-12-18 18:59 @tedcy
自已写个free代替之作者: tedcy 时间: 2012-12-18 19:00 回复 3# crazyhadoop
我的内核是2.6.32-279.14.1.el6.x86_64
“There is hope the kernel developers might fix or have fixed this feature already: The changelog for 2.6.30.1 lists several bugfixes for it, but the author doesn't seem to be sure to have catched them all, and asks for bugreports if problems still arise. Luckily, it will be some time before we change to a kernel >2.6.30.1, so I will not be a guinea pig again anytime soon.”
应该不是这个文中提到的原因。