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



Jason Thorpe <thorpej%me.com@localhost> writes:

>> On Oct 22, 2026, at 7:23 PM, Taylor R Campbell <riastradh%netbsd.org@localhost> wrote:
>> 
>> I think this change may not be correct.  I don't think pool_cache_get
>> respects PR_ZERO.  Perhaps we should add an assertion about this and
>> audit the system for it (or make it work by judiciously adding a
>> memset if PR_ZERO is passed).
>
> pool_cache_get() is intended to return constructed objects.  I guess making it support PR_ZERO is OK so long as the cache doesn’t specify a constructor function, and should blow up on incompatible arguments if it does have one.

That's a really good point.  I had forgotten the wisdom of the original
papers.

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?



Home | Main Index | Thread Index | Old Index