zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Philippe Troin <phil@fifi.org>
Cc: Zsh workers <zsh-workers@sunsite.dk>
Subject: Re: LC_NUMERIC=fr_FR and floating point arithmetics
Date: Wed, 12 Mar 2003 09:30:16 +0100	[thread overview]
Message-ID: <20649.1047457816@finches.logica.co.uk> (raw)
In-Reply-To: <87bs0hdzuw.fsf@ceramic.fifi.org>

Philippe Troin wrote:
> 
> Aren't you leaking a copy of the current locale (via dupstring())
> every time?

dupstring() calls zhalloc() to allocate memory instead of zalloc()
(unlike ztrdup()). So the memory should be freed the next time popheap()
is called (which I think is done for each command line). The comment at
the top of mem.c is what I'm basing this on. So I've always assumed that
zalloc should only be used for things which need to persist from one
command to the next, where realloc() is needed or where a large chunk of
memory is needed.

Oliver


      reply	other threads:[~2003-03-12  8:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-24 17:45 Stephane CHAZELAS
2003-03-10  8:58 ` Oliver Kiddle
2003-03-10 19:25   ` Zefram
2003-03-11 10:35     ` Oliver Kiddle
2003-03-12  3:32       ` Philippe Troin
2003-03-12  8:30         ` Oliver Kiddle [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=20649.1047457816@finches.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=phil@fifi.org \
    --cc=zsh-workers@sunsite.dk \
    /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).