Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
When is mem.c / malloc called?
- X-seq: zsh-workers 40514
- From: Sebastian Gniazdowski <psprint2@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: When is mem.c / malloc called?
- Date: Fri, 10 Feb 2017 04:24:34 -0800
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= mesmtp; bh=wyJAvxexx6b1H7BsLtAjSndCd5g=; b=RrSKtsXV9A3KT5kqDkU7I 9wrevnpbJfQ21IRtwxWHQtCTyf4qu3DEVxHwF33vSH5xfxyhaaphPfUk3z8JeA9l XQw2RjA8lICffdp+H65MIMZpigZvCcpccIEps9C4UEEXVetNbeRr8Mry5zAcWbxF d08QbxEv++5QhggiLgs7AM=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=smtpout; bh=wyJAvxexx6b1H7BsLtAjSndCd 5g=; b=fpn+BTal1sE4hjHHVJbHb1WIV/wtYcWY/uC2NWta0DjW74GsQ8n91Fce6 M/07xyVuyZ/OnDLw1hKm/9PwJgyPh4APmrTaGwBmSfWbo+xkohyg9oTSDvUqti7B KNaZo2aKWSsLNhajZN+LOMHNhXa/p3KAJc6G61cAP8s6hUtZ4c=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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@xxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author