diff options
author | H. Peter Anvin <hpa@zytor.com> | 2001-10-15 19:54:24 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2001-10-15 19:54:24 +0000 |
commit | 539d446c54ca63823f7ef4ede1aee45ea637473a (patch) | |
tree | 9b8162f500ccbba0d4db29e7fab530937e761e9c | |
parent | 126bae3d727cfe2b7f2b5e42a52431a359c6a5dd (diff) | |
download | lpsm-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |