aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2001-10-15 19:54:24 +0000
committerH. Peter Anvin <hpa@zytor.com>2001-10-15 19:54:24 +0000
commit539d446c54ca63823f7ef4ede1aee45ea637473a (patch)
tree9b8162f500ccbba0d4db29e7fab530937e761e9c
parent126bae3d727cfe2b7f2b5e42a52431a359c6a5dd (diff)
downloadlpsm-539d446c54ca63823f7ef4ede1aee45ea637473a.tar.gz
lpsm-539d446c54ca63823f7ef4ede1aee45ea637473a.tar.xz
lpsm-539d446c54ca63823f7ef4ede1aee45ea637473a.zip
Add FIXME: watch out for excessive fragmentation when shrinking anto-tytso-20011015
allocation with realloc().
-rw-r--r--alloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/alloc.c b/alloc.c
index 9b22672..39a2585 100644
--- a/alloc.c
+++ b/alloc.c
@@ -734,6 +734,10 @@ static void *objstore_realloc_buddy(void *ptr, size_t new_size)
/* Allocation shrink. Return the extra space to the arena;
no copy. */
+ /*** FIXME: this could be bad for fragmentation if the
+ *** allocation size delta is large. Consider adding a
+ *** heuristic copy to a less prime spot if delta is large. */
+
/* Clear the old allocation size bit. */
xbit = bp.xbit;
clr_bit(ah->alloc_bitmap, xbit);