Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 18 Sep 2015 19:11:49 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: calloc()/mmap() vs. fork()

On 2015-09-18 19:04, Solar Designer wrote:
> On Fri, Sep 18, 2015 at 06:49:22PM +0200, magnum wrote:
>> On 2015-09-17 20:53, Solar Designer wrote:
>>> I've just tried changing our mem_calloc() to make it actually use
>>> calloc(), and using it for the hash tables and bitmaps in loader.c.
>>
>> This was news to be, although git blame shows I should have been aware
>> of it. I regard it a bug and have now committed such a change.
>
> Now we'll need to look out for fork() performance regressions, if we
> start using mem_calloc() for anything large prior to fork().

Yes. We'll just implement a mem_alloc_clear() that does it the old way, 
if/when needed. Preferably using the same (count, size) interface for 
easy switching.

>> After reverting that problematic patch, I tried using calloc() in loader
>> with no problems (nor any clear benefit) but haven't committed that.
>
> OK.  You have tried it with --fork, right?

Yes. If anything, it got slightly worse total time (a couple hundred ms).

magnum

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.