Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
compsys maps anonymous memory and never frees it
- X-seq: zsh-users 13185
- From: "xRaich[o]²x" <raichoo@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: compsys maps anonymous memory and never frees it
- Date: Wed, 03 Sep 2008 04:09:48 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:user-agent :mime-version:to:subject:content-type:content-transfer-encoding:from; bh=LeP75M72SY3wqnhqOnTKpOiZ+9MMNMcm938OSvnALKs=; b=GzH5B6gvipSUr468qygGWJHkZoXt3EbbjNFpjX2j0AyMp9+6OoSKVzft/6G3CDWuRt XBFVyy9u1d8GmjeXwZbWoGM6TkbcGr+CFobpvNp9bDNhj98EiI+q1+hD1mNpMbsgkHmU 3uGX+ezDQ0el4YYa6HnszynKQQvoqXtzTtPgk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:subject:content-type :content-transfer-encoding:from; b=BwJ6h8cPqovhyxOhDRm3Af0Yv683VTJuqqyfqBkmszLpmdfLzRkLaKdiF7UHIYBFhW VOi5dV8Vmxvd434/o9FBtH6z1b1I+YAKzgM7nvKeK8DFenkJc1RVxjJl49SJs+btV4k/ BkG5SmZ6lKg6yYwMKTWUCADJ9NrEqsVANJdeg=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi,
I made an interesting observation while testing compsys in zsh on
OpenSolaris. Everytime completion kicks in zsh maps a segment of
anonymous memory and it looks like that it won't unmap it. Another thing
is that is does this even when completing something that already has
been completed. So _every_ completion does this regardless of if it's
already been called.
Here is the pmap output of a fresh zsh right after loading compinit
[raichoo@itzkoatl:Projects]> pmap -x $$
1217: zsh
Address Kbytes RSS Anon Locked Mode Mapped File
0803F000 36 36 4 - rw--- [ stack ]
08050000 448 448 - - r-x-- zsh
080CF000 28 28 - - rwx-- zsh
080D6000 8 4 - - rwx-- zsh
080D8000 512 508 - - rwx-- [ heap ]
D0D20000 24 24 - - r-x-- zutil.so
D0D35000 4 4 - - rwx-- zutil.so
D0D40000 104 104 - - r-x-- complete.so
D0D69000 8 8 - - rwx-- complete.so
D0D70000 4 4 4 - rwx-- [ anon ]
D0D80000 28 28 - - r-x-- parameter.so
D0D96000 4 4 - - rwx-- parameter.so
D0DA0000 164 164 - - r-x-- zle.so
D0DD8000 28 28 - - rwx-- zle.so
D0DDF000 4 4 - - rwx-- zle.so
D0E00000 16 16 - - rw--- [ anon ]
D0E10000 64 16 - - rwx-- [ anon ]
D0E30000 56 56 - - r-x-- methods_unicode.so.3
D0E4D000 4 4 - - rwx-- methods_unicode.so.3
D0E50000 4 4 4 - rwx-- [ anon ]
D0E60000 2176 708 - - r-x-- en_US.UTF-8.so.3
D108F000 8 8 - - rwx-- en_US.UTF-8.so.3
D10A7000 4 4 - - rwxs- [ anon ]
D10B0000 24 20 4 - rwx-- [ anon ]
D10C0000 1220 892 - - r-x-- libc.so.1
D1201000 32 32 - - rwx-- libc.so.1
D1209000 8 8 - - rwx-- libc.so.1
D1210000 320 220 - - r-x-- libm.so.2
D126F000 8 8 - - rwx-- libm.so.2
D1280000 4 4 4 - rwx-- [ anon ]
D1290000 160 132 - - r-x-- libcurses.so.1
D12C8000 28 28 - - rw--- libcurses.so.1
D12CF000 8 8 - - rw--- libcurses.so.1
D12E0000 568 492 - - r-x-- libnsl.so.1
D137E000 24 24 - - rw--- libnsl.so.1
D1384000 20 12 - - rw--- libnsl.so.1
D13A0000 4 4 - - r-x-- libdl.so.1
D13B0000 4 4 4 - rwx-- [ anon ]
D13C0000 176 176 - - r-x-- ld.so.1
D13FC000 8 8 4 - rwx-- ld.so.1
D13FE000 4 4 4 - rwx-- ld.so.1
-------- ------- ------- ------- -------
total Kb 6356 4288 32 -
The next thing i will do is complete "mount -F [complete]" for a couple
of times so it shows
me the existing filesystems
[raichoo@itzkoatl:Projects]> pmap -x $$
1217: zsh
Address Kbytes RSS Anon Locked Mode Mapped File
0803E000 40 40 4 - rw--- [ stack ]
08050000 448 448 - - r-x-- zsh
080CF000 28 28 - - rwx-- zsh
080D6000 8 4 - - rwx-- zsh
080D8000 600 600 - - rwx-- [ heap ]
D0AA1000 12 12 - - rw--- [ anon ]
D0AB1000 12 12 - - rw--- [ anon ]
D0AC1000 12 12 - - rw--- [ anon ]
D0AD1000 12 12 - - rw--- [ anon ]
D0AE1000 12 12 - - rw--- [ anon ]
D0AF1000 12 12 - - rw--- [ anon ]
D0B01000 12 12 - - rw--- [ anon ]
D0B11000 12 12 - - rw--- [ anon ]
D0B21000 12 12 - - rw--- [ anon ]
D0B31000 12 12 - - rw--- [ anon ]
D0B41000 12 12 - - rw--- [ anon ]
D0B51000 12 12 - - rw--- [ anon ]
D0B61000 12 12 - - rw--- [ anon ]
D0B71000 12 12 - - rw--- [ anon ]
D0B81000 12 12 - - rw--- [ anon ]
D0B91000 12 12 - - rw--- [ anon ]
D0BA1000 12 12 - - rw--- [ anon ]
D0BB1000 12 12 - - rw--- [ anon ]
D0BC1000 12 12 - - rw--- [ anon ]
D0BD1000 12 12 - - rw--- [ anon ]
D0BE1000 12 12 - - rw--- [ anon ]
D0BF1000 12 12 - - rw--- [ anon ]
D0C01000 12 12 - - rw--- [ anon ]
D0C11000 12 12 - - rw--- [ anon ]
D0C21000 12 12 - - rw--- [ anon ]
D0C31000 12 12 - - rw--- [ anon ]
D0C41000 12 12 - - rw--- [ anon ]
D0C51000 12 12 - - rw--- [ anon ]
D0C61000 12 12 - - rw--- [ anon ]
D0C71000 12 12 - - rw--- [ anon ]
D0C81000 12 12 - - rw--- [ anon ]
D0C91000 12 12 - - rw--- [ anon ]
D0CA1000 12 12 - - rw--- [ anon ]
D0CB1000 12 12 - - rw--- [ anon ]
D0CC1000 12 12 - - rw--- [ anon ]
D0CD0000 4 4 4 - rwx-- [ anon ]
D0CE0000 52 52 - - r-x-- computil.so
D0CFC000 4 4 - - rwx-- computil.so
D0D11000 12 12 - - rw--- [ anon ]
D0D20000 24 24 - - r-x-- zutil.so
D0D35000 4 4 - - rwx-- zutil.so
D0D40000 104 104 - - r-x-- complete.so
D0D69000 8 8 - - rwx-- complete.so
D0D70000 4 4 4 - rwx-- [ anon ]
D0D80000 28 28 - - r-x-- parameter.so
D0D96000 4 4 - - rwx-- parameter.so
D0DA0000 164 164 - - r-x-- zle.so
D0DD8000 28 28 - - rwx-- zle.so
D0DDF000 4 4 - - rwx-- zle.so
D0DF1000 12 12 - - rw--- [ anon ]
D0E00000 16 16 - - rw--- [ anon ]
D0E10000 64 16 - - rwx-- [ anon ]
D0E30000 56 56 - - r-x-- methods_unicode.so.3
D0E4D000 4 4 - - rwx-- methods_unicode.so.3
D0E50000 4 4 4 - rwx-- [ anon ]
D0E60000 2176 708 - - r-x-- en_US.UTF-8.so.3
D108F000 8 8 - - rwx-- en_US.UTF-8.so.3
D10A7000 4 4 - - rwxs- [ anon ]
D10B0000 24 20 4 - rwx-- [ anon ]
D10C0000 1220 892 - - r-x-- libc.so.1
D1201000 32 32 - - rwx-- libc.so.1
D1209000 8 8 - - rwx-- libc.so.1
D1210000 320 220 - - r-x-- libm.so.2
D126F000 8 8 - - rwx-- libm.so.2
D1280000 4 4 4 - rwx-- [ anon ]
D1290000 160 132 - - r-x-- libcurses.so.1
D12C8000 28 28 - - rw--- libcurses.so.1
D12CF000 8 8 - - rw--- libcurses.so.1
D12E0000 568 492 - - r-x-- libnsl.so.1
D137E000 24 24 - - rw--- libnsl.so.1
D1384000 20 12 - - rw--- libnsl.so.1
D13A0000 4 4 - - r-x-- libdl.so.1
D13B0000 4 4 4 - rwx-- [ anon ]
D13C0000 176 176 - - r-x-- ld.so.1
D13FC000 8 8 4 - rwx-- ld.so.1
D13FE000 4 4 4 - rwx-- ld.so.1
-------- ------- ------- ------- -------
total Kb 6952 4888 36 -
Sure this doesn't consume a lot of memory but it's pretty ugly. I did
that for some time and the list
got longer and longer (see below) and no sight of any memory being unmapped.
[raichoo@itzkoatl:Projects]> pmap -x $$ | wc -l
163
This even kicks in on regular command completion.
Regards,
Björn
Messages sorted by:
Reverse Date,
Date,
Thread,
Author