Simple implementation of a buddy system for memory management.