Add some test cde for the buddy allocator and fix some bugs.