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.
翻译:内存重分配问题要求动态地将不同大小的给定对象分配到非重叠的连续内存块中,同时以在线方式支持更新(插入/删除)操作。在任何时刻,存活对象的总大小保证不超过总内存的$1-ε$比例。为处理在线更新,分配器可以重新排列内存中的对象以腾出空间,该更新的开销定义为被移动对象的总大小除以被插入/删除对象的大小。我们的主要成果是设计了一个最坏情况期望开销为$\mathrm{polylog}(ε^{-1})$的分配器。这指数级改进了Farach-Colton、Kuszmaul、Sheffield和Westover(2024)先前实现的$\tilde O(ε^{-1/2})$最坏情况期望开销,从而缩小了与$Ω(\logε^{-1})$下界之间的差距。我们的改进基于Erdős和Sárközy(1992)在子集和问题背景下曾使用的向日葵引理的应用。我们的分配器仅在期望意义上实现多对数开销,且有时会执行代价较高的重建操作。我们的第二项技术结果表明这是不可避免的:无法以高概率实现亚多项式开销。