Kernel compaction