Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys
In article <b2428d7e-ec70-268b-0dc4-cdd59ea36039%m00nbsd.net@localhost>,
Maxime Villard <max%m00nbsd.net@localhost> wrote:
>Le 29/11/2018 à 19:51, Christos Zoulas a écrit :
>> In article <20181129174012.9AD90FB20%cvs.NetBSD.org@localhost>,
>> Maxime Villard <source-changes-d%NetBSD.org@localhost> wrote:
>>> -=-=-=-=-=-
>>>
>>> Module Name: src
>>> Committed By: maxv
>>> Date: Thu Nov 29 17:40:12 UTC 2018
>>>
>>> Modified Files:
>>> src/sys/compat/linux/common: linux_misc_notalpha.c
>>> src/sys/kern: kern_time.c
>>>
>>> Log Message:
>>> Improve my kern_time.c::rev1.192, systematically clear the buffers we get
>>>from 'ptimer_pool' to prevent more leaks.
>>
>> Shouldn't those pools be converted to pool_cache_*() so that we can use
>> constructors to avoid sprinking memset() all over the place?
>>
>> christos
>
>I thought about it, but I ended up telling myself that it was better not to
>completely modify the allocator just add a memset constructor, and that it
>was easier to add the memset after the allocation rather than inside.
>
>The pool is just called three times, so it's not a big deal.
I don't know, from reading the manual page using the pool_cache_ api seems
to be the preferred way... Plus I don't think that a language deficiency
should be visible in many places in the code (these memsets appear
unnecessary) and if we do them using the pool_cache code we pay the cost
once (at construction), not every use (however minor that cost is).
christos
Home |
Main Index |
Thread Index |
Old Index