Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: maximum value for HISTSIZE ?
- X-seq: zsh-users 10126
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: maximum value for HISTSIZE ?
- Date: Sat, 01 Apr 2006 22:54:09 -0800
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author