Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh and memory



>>>>> "Sven" == Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

    Sven> I wrote:

    >> I'm really tempted to allocate heaps using mmap() (anonymous)
    >> to get them out of the way of the zalloc() allocator. I small
    >> test showed that with this I only get 39KB of free memory after
    >> the completion test, which is really not too bad. I don't have
    >> a patch for that yet, though.

    Sven> ... and now I don't think I'll ever write one: neither
    Sven> Solaris nor Linux seem to have MAP_ANONYMOUS. Sniff.

        My copy seems to, at least according to mmap(2):

[...]
       The  above three flags are described in POSIX.1b (formerly
       POSIX.4).  Linux also knows about MAP_DENYWRITE,  MAP_EXE-
       CUTABLE and MAP_ANON(YMOUS).
[...]

        There's also Ralf Engelschall's mm library that hides shared
memory allocations in a platform independent way:

http://www.engelschall.com/sw/mm/

        But that's more for handling shared segments between multiple
processes.  Of course there was that talk of making all zsh processes
share the same zcompdump . . . :).

-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch@xxxxxxxxxxxx   |  Vincent, you should cease askin'          \ o.O'
678 443-6239(w)       |  scary questions." -- Jules                =(___)=
                      |                                               U



Messages sorted by: Reverse Date, Date, Thread, Author