Re: free_page

Momchil Velikov (velco@fadata.bg)
Thu, 14 Oct 1999 10:04:19 +0300


Xavier Leclercq wrote:
>
> I'm reading the implementation of the buddy algorithm.
> I was wondering what happens if someone tries to free a block of order k
> while one
> of the buddies of order k-1 which make this block is already free and
> the other isn't.
Bad things happen. If the allocator gave you the k-block, it
shouldn't have given you any of the (k-1)-blocks which are part of it it,
and vice versa.

> Or should one make sure not to free already free blocks ?
Definitely.

Regards,
-velco

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/