Fix losing memory blocks during compaction
Test used/free bytes and allocated/free blocks.