我正在内核中开发一个使用kmem_cache的模块。在开发和测试过程中,可能出现了一些问题,或者我想在缓存中仍有一些分配未被释放的情况下退出模块。使用仍然有元素的缓存调用kmem_cache_destroy会在dmesg:kmem_cache_destroy <my_cache>: Slab cache still has objects中抛出一个保护错误以及通常的巨大转储像这样的事情重复了这个问题:
#include <linux/slab
ls /var/cache/apt/archives和/var/cache/apt/archives/partial 这里的输出。Depends: linux-headers-generic (= 3.2.0.76.90) but it is not going to be installed
linux-server : Depends3.2.0-61 linux-headers-3.2.0-64 lin