From: Sebastian Gniazdowski <psprint2@fastmail.com>
To: zsh-workers@zsh.org
Subject: When is mem.c / malloc called?
Date: Fri, 10 Feb 2017 04:24:34 -0800 [thread overview]
Message-ID: <1486729474.1489636.876722008.7B4EC1FC@webmail.messagingengine.com> (raw)
Hello,
I've did:
@@ -1201,6 +1201,8 @@ static struct m_hdr *m_l;
MALLOC_RET_T
malloc(MALLOC_ARG_T size)
{
+ fprintf( stderr, "Hello\n" );
+ fflush( stderr );
struct m_hdr *m, *mp, *mt;
And compiled once without --enable-zsh-mem, once with it. Then in a
module I've called zshcalloc() and malloc(). Didn't get the message. Zsh
startup also didn't produce anything.
Is there a configuration when non-standard malloc() will be used?
I'm writing a module that needs thread safe memory allocation. So
dupstring() is out. System malloc() is as I researched good. I have to
stick to it when allocating hash, array and variable. As dupstring()
etc. is a temporary memory, I should be fine assuming that I won't have
to use zhalloc() when allocating permanent variables. But custom
internal malloc() would kill the thing.
--
Sebastian Gniazdowski
psprint2@fastmail.com
next reply other threads:[~2017-02-10 12:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 12:24 Sebastian Gniazdowski [this message]
2017-02-10 15:17 ` Sebastian Gniazdowski
2017-02-10 18:11 ` Bart Schaefer
2017-02-10 18:25 ` Bart Schaefer
2017-02-10 19:45 ` Sebastian Gniazdowski
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=1486729474.1489636.876722008.7B4EC1FC@webmail.messagingengine.com \
--to=psprint2@fastmail.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).