From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2540 invoked by alias); 10 Feb 2017 12:24:48 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40514 Received: (qmail 23885 invoked from network); 10 Feb 2017 12:24:48 -0000 X-Qmail-Scanner-Diagnostics: from new1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.221):SA:0(-0.4/5.0):. Processed in 1.407484 secs); 10 Feb 2017 12:24:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint2@fastmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.messagingengine.com designates 66.111.4.221 as permitted sender) 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= X-ME-Sender: Message-Id: <1486729474.1489636.876722008.7B4EC1FC@webmail.messagingengine.com> From: Sebastian Gniazdowski To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-4a450d19 Date: Fri, 10 Feb 2017 04:24:34 -0800 Subject: When is mem.c / malloc called? 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