[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/3] Allow removal of current Slab
On 08/06/2023 08:10, Owen Smith wrote: if (Cache->Cursor == &Slab->ListEntry) - Cache->Cursor = &Cache->SlabList; + Cache->Cursor = Slab->ListEntry.Blink;Looks like this blind walk back could end up with Cursor pointing to a full Slab. Right. That makes sense. Thinking about it, a more elegant solution could be to not remove the empty Slab if its the current slab (removes the need to destroy an empty slab, probably shortly followed by adding a new Slab when the nex CacheGet is called). The teardown case where CacheSpill(Cache, 0), on the CacheCreate fail path and CacheDestroy should NULL the Cursor, effectively ignoring the Cursor == &SlabList checkLet me try a patch that implements this method Yes, that sounds much better. Paul
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |