From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-users-return-23680-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 31abfaf2 for ; Mon, 24 Sep 2018 15:37:53 +0000 (UTC) Received: (qmail 27342 invoked by alias); 24 Sep 2018 15:37:37 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23680 Received: (qmail 24570 invoked by uid 1010); 24 Sep 2018 15:37:37 -0000 X-Qmail-Scanner-Diagnostics: from mail-yw1-f46.google.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(209.85.161.46):SA:0(-1.9/5.0):. Processed in 3.39469 secs); 24 Sep 2018 15:37:37 -0000 X-Envelope-From: robobenklein@gmail.com X-Qmail-Scanner-Mime-Attachments: |signature.asc| X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:openpgp:autocrypt:message-id:date:user-agent :mime-version; bh=SygIP7AaSePlJudPv3/CimVMb99/w78yPsYjb8YRxxg=; b=PdnOy08eS70L8LLdGDdiHYXY5tFRLjwn3/OTZKCqjZ/IAhxu/59Oj3RWg4efTOaqTn iRkwSd3G6be+bu/GQ0bvQNj6e0zF5siPbX4poCQQ7fZlPQhl/5pe0+BYw0n5ribnrpzR 3p20Z9aRQ9ARU8jEajGGUR/0bnQWpqWI/DLIU8DZLAIH/HH/gnyNEqkwF67YyqSZMUxV 0LCscT7iOOBkwaOK3/BvNK2dZP/qik3N6+aBdVwYlvf6eQa5W+c2h1gTUb0We8+GoShe 3eaH4bz9IdcXYHJavtDBvhIvc0Tm81bpuHC8jLGTbo1xIm3r+KYYiTLpTwsrywquzJXz 27hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:openpgp:autocrypt:message-id :date:user-agent:mime-version; bh=SygIP7AaSePlJudPv3/CimVMb99/w78yPsYjb8YRxxg=; b=XCaQADc6r1yNsyN+FcsSIGQSVV3DYdw0Xmd/0TY0guKqwkBP3FlyDWSNTfZjQzSEO3 a7UMgOYb5D94/we9Cu7JtkpUv66gPPzzKNYA3Wbie0k66mmaQTRziPZ/PuhJMG+NVcNa aZFO2uBQkB2wl9Y/SiVd69OFkyscV5/4xBcE9XDW5PfbwTYhEGpBSGZhkvu4ldpCjy8b Nw+n8ISV5Ke70LAIivg1UkMoM/MatHqT5dqjjKRtszHjAoNtz47oeI7iYXmdQwFeaK4K Xot3tM5d62RKQ5UpiW8jiLOj7fOdjgyFbjInMHGW7qL8wrfsfjccgMyqdUmQ6+ANbxSR PCYg== X-Gm-Message-State: ABuFfohY7fzCgLu4E/rCIznDWCibOm6AX+y/BEs3kwGU5bDuCEDc867I XvSFG2f7+3jZOHmRBaLoAxFjba0i X-Google-Smtp-Source: ANB0VdZxyBnNHfr64DcSTrYVI9ZgaQzb3aaNQKLwRy463iYyo3uGs3CIPuqmwvjswT6D7fpbhH+6vA== X-Received: by 2002:a81:58d5:: with SMTP id m204-v6mr5100128ywb.470.1537803449947; Mon, 24 Sep 2018 08:37:29 -0700 (PDT) From: Ben Klein Subject: `reset-prompt` timer without leaking memory? To: zsh-users@zsh.org Openpgp: preference=signencrypt Autocrypt: addr=robobenklein@gmail.com; prefer-encrypt=mutual; keydata= mDMEW4xlWhYJKwYBBAHaRw8BAQdAc4bu9FvZW7KVI/XTSNArUywJnJ6rspqokOlLmdYHpEy0 IkJlbiBLbGVpbiA8cm9ib2JlbmtsZWluQGdtYWlsLmNvbT6IlgQTFggAPhYhBOHTD5LgKr+B 0cEun4EyYIP3o2JVBQJbjGVaAhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJ EIEyYIP3o2JVSGYA/iwjCP86SP80hezhBqn31x2tsOvQRDb0aqYC3rcv2ZafAQC9VQxIe4Tr 3L40INqNo/cl7eUWfiRegwBTeYtcya4zBbg4BFuMZVoSCisGAQQBl1UBBQEBB0DXVfLX5XuW 05wiu+s6XHUE3iF5sJCQW2wrT+MOnOopSwMBCAeIfgQYFggAJhYhBOHTD5LgKr+B0cEun4Ey YIP3o2JVBQJbjGVaAhsMBQkDwmcAAAoJEIEyYIP3o2JV0UoBAJhQNH1i2+Rm//o2GBIoUA7c ywHlC/257mLtJPPnLJo4AP9csP4/Aw8RX7TlCU5X+mmmI1kligdWaAb+mNpy40MsAg== Message-ID: <82cbee18-8b4c-4fa9-48dc-eb940d12c1f4@gmail.com> Date: Mon, 24 Sep 2018 11:37:27 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KNHyHKPc013t9loeJVCfpydgCRDaU8Uvh" --KNHyHKPc013t9loeJVCfpydgCRDaU8Uvh Content-Type: multipart/mixed; boundary="TW1l45ds9l9bQWok77iBpPcKsjBeCE4dS"; protected-headers="v1" From: Ben Klein To: zsh-users@zsh.org Message-ID: <82cbee18-8b4c-4fa9-48dc-eb940d12c1f4@gmail.com> Subject: `reset-prompt` timer without leaking memory? --TW1l45ds9l9bQWok77iBpPcKsjBeCE4dS Content-Type: multipart/alternative; boundary="------------5CC5DBCA6DBF623105378106" Content-Language: en-US This is a multi-part message in MIME format. --------------5CC5DBCA6DBF623105378106 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I am working on a new ZSH theme and am trying to get time shown with seconds while waiting on input. My arbitrary approaches have so far resulted in the zsh process consuming more and more memory the longer I leave it. On zsh 5.4.2: zsh -f robo-unseptium% hi(){ zle .reset-prompt } robo-unseptium% trap hi ALRM robo-unseptium% TMOUT=3D2 And then I let the shell sit there and it slowly consumes more memory. Watching with: ps --ppid 12490 -o command,vsize,rss,%mem,size Most noticeably, the RSS continues to increment by 4kb every so often, not sure if it's exactly on the ALRM signal timing but it appears to be on a similar regular interval. (Started it last night at 10MB, now at 60MB memory usage.) Should I try a different zsh version or start digging through memory? Or is there some option I am potentially missing that would stop this growing memory? --=20 *\Ben Klein* Founder and Owner of Robosane, robobenklein@robosane.net You can find me elsewhere online as 'robobenklein'. If you need to contact me securely, I am also reachable via GPG, or on Keybase. --------------5CC5DBCA6DBF623105378106 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

I am working on a new ZSH theme and am trying to get time shown with seconds while waiting on input.

My arbitrary approaches have so far resulted in the zsh process consuming more and more memory the longer I leave it.

On zsh 5.4.2: zsh -f

robo-unseptium% hi(){ zle .reset-prompt }
robo-unseptium% trap hi ALRM
robo-unseptium% TMOUT=3D2

And then I let the shell sit there and it slowly consumes more memory. Watching with:

ps --ppid 12490 -o command,vsize,rss,%mem,size

Most noticeably, the RSS continues to increment by 4kb every so often, not sure if it's exactly on the ALRM signal timing but it appears to be on a similar regular interval. (Started it last night at 10MB, now at 60MB memory usage.)

Should I try a different zsh version or start digging through memory? Or is there some option I am potentially missing that would stop this growing memory?

--
\Ben Klein
Founder and Owner of Robosane, robobenklein@robosane.n= et
You can find me elsewhere online as 'robobenklein'.
If you need to contact me securely, I am also reachable via GPG, or on Keybase.
--------------5CC5DBCA6DBF623105378106-- --TW1l45ds9l9bQWok77iBpPcKsjBeCE4dS-- --KNHyHKPc013t9loeJVCfpydgCRDaU8Uvh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTh0w+S4Cq/gdHBLp+BMmCD96NiVQUCW6kEuAAKCRCBMmCD96Ni VQ/DAQDObLloqZTk9HLWwAOGXNEZt/P119fnwkKXMNBgEQTj/AEA/mVqAlTeXy9/ zyQ5indIi0bD4d2jMHtS2/nyT8lifwo= =U+EF -----END PGP SIGNATURE----- --KNHyHKPc013t9loeJVCfpydgCRDaU8Uvh--