Implementation of malloc's binary buddy system