Ok, “guarantees” is maybe too strong of a statement. Part of the pool_cache API contract is that, when using a constructor, you’ll also put things back into the cache in a valid constructed state (this is the same behavior as Solaris’s kmem_cache). But I don’t think that invalidates my argument here. It’s still part of the API contract that pool_cache_get() returns a constructed object. -- thorpej
|