zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <psprint@zdharma.org>
To: Mikael Magnusson <mikachu@gmail.com>, zsh-workers@zsh.org
Subject: Re: PATCH: Free stuff properly in zsh/pcre module
Date: Mon, 8 Jan 2018 13:29:10 +0100	[thread overview]
Message-ID: <etPan.5a536417.6834ff3f.14e5a@zdharma.org> (raw)
In-Reply-To: <20180107140939.6930-1-mikachu@gmail.com>

On 7 stycznia 2018 at 15:09:39, Mikael Magnusson (mikachu@gmail.com) wrote:
> Fix a few memleaks of the hints structure, also make sure to free all
> the allocated stuff when the module is unloaded.
>  
> ---
>  
> If you run
> % zmodload zsh/pcre; pcre_compile hey; repeat 1000000; do pcre_study; done
> then zsh mem usage goes up by about 100MB each time.

Maybe Valgrind automatic tests can be integrated for next Zsh release? I've updated the README:

https://github.com/zdharma/VATS-zsh

It much helps to track things like the above reported leaks. Today, I was extending a module (an external one) and by logic, the changes couldn't cause any error or leak, but I just ran 7 test-sets, in 5 minutes (excluding the time devoted to updates needed for optimized Zsh build, which was skipping some function calls), and was done.

-- 
Sebastian Gniazdowski 
psprint /at/ zdharma.org 


      reply	other threads:[~2018-01-08 12:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-07 14:09 Mikael Magnusson
2018-01-08 12:29 ` Sebastian Gniazdowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=etPan.5a536417.6834ff3f.14e5a@zdharma.org \
    --to=psprint@zdharma.org \
    --cc=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).