Hi, On 2022-07-05 16:33:29 +0900, Masahiko Sawada wrote: > > One thing I was wondering about is trying to choose node types in > > roughly-power-of-two struct sizes. It's pretty easy to end up with > > significant > > fragmentation in the slabs right now when inserting as you go, because some > > of > > the smaller node types will be freed but not enough to actually free blocks > > of > > memory. If we instead have ~power-of-two sizes we could just use a single > > slab > > of the max size, and carve out the smaller node types out of that largest > > allocation. > > You meant to manage memory allocation (and free) for smaller node > types by ourselves?
For all of them basically. Using a single slab allocator and then subdividing the "common block size" into however many chunks that fit into a single node type. > How about using different block size for different node types? Not following... Greetings, Andres Freund