summaryrefslogtreecommitdiff
path: root/buddy.h
diff options
context:
space:
mode:
Diffstat (limited to 'buddy.h')
-rw-r--r--buddy.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/buddy.h b/buddy.h
index 0b4de09..ad4f4aa 100644
--- a/buddy.h
+++ b/buddy.h
@@ -24,3 +24,8 @@ void debug_buddy(struct buddy *state);
void *reallocate(void *old, size_t old_size, size_t new_size,
struct buddy *state);
int reserve(void *start, size_t size, struct buddy *state);
+
+// grow can also be used to move the buddy. grow can never fail.
+void grow_buddy(uint8_t *new_base, size_t new_size, struct buddy *state);
+// 0 -> failure. always in-place. to do out-of-place, first shrink then grow.
+int shrink_buddy(size_t new_size, struct buddy *state);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback