Modified buddy system code