Memory Reallocation with Polylogarithmic Overhead
Ce Jin
TL;DR
This work advances the Memory Reallocation problem by introducing a randomized resizable allocator that achieves polylogarithmic worst-case expected overhead in the load-factor deficit $\varepsilon$, significantly surpassing previous bounds. The approach leverages additive combinatorics, notably the sunflower lemma and Erdős–Sárközy equal-sum subsets, to bundle objects into a bounded number of sizes, enabling efficient substitutions with periodic rebuilds. A dual contribution establishes a logarithmic lower bound for expected overhead and a polynomial lower bound for expected squared overhead, proving that high-probability subpolynomial overhead is impossible in general. The combination of bundling and a structured rebuild strategy yields a near-optimal, polylogarithmic expected overhead while clarifying fundamental limits of tail guarantees. Overall, the paper demonstrates that sunflower-based grouping can powerfully inform dynamic memory allocation with reallocation, and it outlines open questions on time complexity and high-probability performance.
Abstract
The Memory Reallocation problem asks to dynamically maintain an assignment of given objects of various sizes to non-overlapping contiguous chunks of memory, while supporting updates (insertions/deletions) in an online fashion. The total size of live objects at any time is guaranteed to be at most a $1-ε$ fraction of the total memory. To handle an online update, the allocator may rearrange the objects in memory to make space, and the overhead for this update is defined as the total size of moved objects divided by the size of the object being inserted/deleted. Our main result is an allocator with worst-case expected overhead $\mathrm{polylog}(ε^{-1})$. This exponentially improves the previous worst-case expected overhead $\tilde O(ε^{-1/2})$ achieved by Farach-Colton, Kuszmaul, Sheffield, and Westover (2024), narrowing the gap towards the $Ω(\logε^{-1})$ lower bound. Our improvement is based on an application of the sunflower lemma previously used by Erdős and Sárközy (1992) in the context of subset sums. Our allocator achieves polylogarithmic overhead only in expectation, and sometimes performs expensive rebuilds. Our second technical result shows that this is necessary: it is impossible to achieve subpolynomial overhead with high probability.
