Add comments

This commit is contained in:
2024-05-09 22:41:23 +02:00
parent 237a2afd91
commit 532eabb264
2 changed files with 144 additions and 2 deletions
+9
View File
@@ -115,6 +115,15 @@ void *buddy_malloc(struct buddy_alloc *alloc, size_t len);
*/
void buddy_free(struct buddy_alloc *alloc, size_t len, void *ptr);
/*
* Returns true if and only if ptr points inside of the memory
* generally available for allocation (even if currently marked
* as allocated).
*/
bool buddy_owned(struct buddy_alloc *alloc, void *ptr);
/*
* Returns true if and only if the block at address ptr of size
* len is owned by the allocator and marked as allocated.
*/
bool buddy_allocated(struct buddy_alloc *alloc, void *ptr, size_t len);