Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe
-fstack-protector-strong -fno-plt
-DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin'
-DSTANDARD_UTILS_PATH='/usr/bin
On 2/8/19 12:39 PM, Eric Blake wrote:
> On 2/8/19 11:26 AM, Peng Yu wrote:
>
>>> Come on. If you're not going to read the code, at least read the comments.
>>
>> This is what I don't understand. Why caching pointers not caching the
>> actual memory allocated to the string can improve the performan
On 2/8/19 11:26 AM, Peng Yu wrote:
>> Come on. If you're not going to read the code, at least read the comments.
>
> This is what I don't understand. Why caching pointers not caching the
> actual memory allocated to the string can improve the performance?
>
>> /* Create an object cache C of N po
On Fri, Feb 8, 2019 at 10:50 AM Chet Ramey wrote:
>
> On 2/8/19 10:52 AM, Peng Yu wrote:
> > On Fri, Feb 8, 2019 at 9:42 AM Chet Ramey wrote:
> >>
> >> On 2/8/19 10:39 AM, Peng Yu wrote:
> Yes: ocache_free.
> >>>
> >>> Could you please help explain what wdcache and wlcache actually do.
> >>>
On 2/8/19 10:52 AM, Peng Yu wrote:
> On Fri, Feb 8, 2019 at 9:42 AM Chet Ramey wrote:
>>
>> On 2/8/19 10:39 AM, Peng Yu wrote:
Yes: ocache_free.
>>>
>>> Could you please help explain what wdcache and wlcache actually do.
>>> Why is it essential to have them? Why not just alloc and free them
>
On Fri, Feb 8, 2019 at 9:42 AM Chet Ramey wrote:
>
> On 2/8/19 10:39 AM, Peng Yu wrote:
> >> Yes: ocache_free.
> >
> > Could you please help explain what wdcache and wlcache actually do.
> > Why is it essential to have them? Why not just alloc and free them
> > without the caches? Thanks.
>
> To a
On 2/8/19 10:39 AM, Peng Yu wrote:
>> Yes: ocache_free.
>
> Could you please help explain what wdcache and wlcache actually do.
> Why is it essential to have them? Why not just alloc and free them
> without the caches? Thanks.
To avoid potentially-expensive calls to malloc and free, the same as
a
> Yes: ocache_free.
Could you please help explain what wdcache and wlcache actually do.
Why is it essential to have them? Why not just alloc and free them
without the caches? Thanks.
--
Regards,
Peng
On 2/7/19 11:43 PM, Peng Yu wrote:
> Hi,
>
> I don't understand the purpose of wdcache and wlcache. The "nc" field
> seems to be always 0 (as initialized in ocache_create(), and I don't
> find where it is increased. But `ocache_alloc()` just call xmalloc
> without using the cache since nc is 0. So