refactor buddy memory allocator impl