Patch: Use calloc instead of malloc when running out of VSM space (common_vsm.c)

Federico Schwindt fgsch at
Tue Mar 8 13:15:45 CET 2016

Incidentally, this also reminds me of something else I observed some time

We use calloc in many places, I do wonder how many of them do really need
it. The downside of using calloc when is not really needed is that by
zeroing the memory you end up with resident memory and not virtual, which
in turn might lead to swapping.

On Tue, Mar 8, 2016 at 10:40 AM, Pål Hermunn Johansen <
hermunn at> wrote:

> Hello,
> I just started working at Varnish Software (last Thursday), and I am
> looking forward to working with the Varnish Cache code. After firm
> guidance from Martin, I am proposing my first patch.
> Best Regards,
> Pål Hermunn Johansen
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-dev mailing list