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

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


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

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 varnish-software.com> 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 varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20160308/90f59ff6/attachment.html>


More information about the varnish-dev mailing list