zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: maximum value for HISTSIZE ?
Date: Sat, 01 Apr 2006 22:54:09 -0800	[thread overview]
Message-ID: <060401225409.ZM9684@torch.brasslantern.com> (raw)

On Apr 2,  2:33am, Andy Spiegl wrote:
} Subject: Re: maximum value for HISTSIZE ?
}
} > There isn't a fixed maximum.  Zsh will try to use all the memory your
} > system will allocate to it to maintain as large a history as you ask.
} > When the memory runs out depends on your system.
} 
} Hm, okay. But an array with 318937 elements should easily be possible
} with 1GB RAM.

You're right.  Although the history can be arbitrarily big, an array can
only have 262144 elements.  I have no idea why that particular number --
it appeared sometime between zsh-2.4 and zsh-3.0, and prior to that an
array was IIRC effectively unbounded.  I don't have records of changes
between 1992 and 1995 ... not only was I busy starting my own business
then, but I was having a disagreement with some of the other developers
and had stopped using new zsh builds.

It's 1/4 of a megabyte, so an array of 262144 32-bit pointers would use
exactly a meg of memory.  Maybe that was/is related to the size of a heap
allocation block.

Perhaps Wayne remembers, or Zefram if he's still reading this list ...

In any case, it might nowadays be possible to increase the constant
MAX_ARRAY in zsh.h.


             reply	other threads:[~2006-04-02  6:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02  6:54 Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-04-10 17:17 Wayne Davison
2006-04-10 17:04 Barton Schaefer
2006-04-10 13:57 Andy Spiegl
2006-04-02  0:33 Andy Spiegl
2006-04-01 22:29 Bart Schaefer
2006-04-01 20:47 Andy Spiegl
2006-04-01 19:10 Carlos Carvalho
2006-04-01  9:32 Andy Spiegl
2006-03-30 12:26 Andy Spiegl
2006-03-30 12:58 ` Francisco Borges
2006-03-30 15:18   ` Andy Spiegl

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=060401225409.ZM9684@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /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).