Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dev/usb
> On Oct 24, 2026, at 10:37 AM, Greg Troxel <gdt%lexort.com@localhost> wrote:
>
> I wonder if it's basically an error to have a pool cache without a
> constructor (semantically). I suppose "all zeros if there is no
> constructor" is perhaps a reasonable sort-of-constructor, as in "safe
> state before real construction".
>
> What does openindiana/illumos do here?
It is not an error to not use a constructor -<em-dash>- esp considering that the general memory allocator is built on top of pool_cache.
IIRC, the original Solaris behavior was “uninitialized if no constructor specified”. I would not advocate for “always zero-init if no constructor” because that could be wasteful. I’d rather have it be an explicit ask when the pool_cache is initialized.
-- thorpej
Home |
Main Index |
Thread Index |
Old Index