zsh-users
 help / color / mirror / code / Atom feed
From: Ben Klein <robobenklein@gmail.com>
To: zsh-users@zsh.org
Subject: `reset-prompt` timer without leaking memory?
Date: Mon, 24 Sep 2018 11:37:27 -0400	[thread overview]
Message-ID: <82cbee18-8b4c-4fa9-48dc-eb940d12c1f4@gmail.com> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 1103 bytes --]

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=2

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.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.

[-- Attachment #1.1.2: Type: text/html, Size: 1679 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

                 reply	other threads:[~2018-09-24 15:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=82cbee18-8b4c-4fa9-48dc-eb940d12c1f4@gmail.com \
    --to=robobenklein@gmail.com \
    --cc=zsh-users@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).