From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 16 Jan 2007 02:19:45 +0300 From: "Dmitry V. Levin" To: ALT Devel discussion list Message-ID: <20070115231945.GB8864@basalt.office.altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <20070115135934.GL30255@osdn.org.ua> <20070115141342.GA26404@basalt.office.altlinux.org> <20070115213303.GA6086@osdn.org.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/NkBOFFp2J2Af1nK" Content-Disposition: inline In-Reply-To: <20070115213303.GA6086@osdn.org.ua> X-fingerprint: FE4C 93AB E19A 2E4C CB5D 3E4E 7CAB E6AC 9E35 361E Subject: Re: [devel] q: glibc malloc s*cks? X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 23:19:51 -0000 Archived-At: List-Archive: List-Post: --/NkBOFFp2J2Af1nK Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 15, 2007 at 11:33:03PM +0200, sr@altlinux.ru wrote: > On Mon, Jan 15, 2007 at 05:13:42PM +0300, Dmitry V. Levin wrote: > > =F3=CB=C1=D6=C9=D4=C5 sr@, =DE=D4=CF glibc malloc =D5=D6=C5 =C4=C1=D7= =CE=CF =C9=D3=D0=CF=CC=D8=DA=D5=C5=D4 mmap. > > =F3=CD. =D4=D6. http://sourceware.org/ml/libc-alpha/2006-11/msg00061.ht= ml >=20 > =E1=C7=C1=DD=C1=DA=C2=CC=C9=CE. =F3=C5=D2=C7=C5=CA, =D3=D0=CF=D2=C9=D4=D8 =D3=CF =CD=CE=CF=CA =CE=C1 =CD=CF= =A3=CD =CD=C9=CE=CE=CF=CD =D0=CF=CC=C5 - =DC=D4=CF =C4=CF=D7=CF=CC=D8=CE=CF= =D2=C9=D3=CB=CF=D7=C1=CE=CE=CF=C5 =CD=C5=D2=CF=D0=D2=C9=D1=D4=C9=C5, =CD=CF=D6=CE=CF =CF=C4=CE=C9=CD =CE=C5= =D5=C4=C1=DE=CE=D9=CD =D3=CC=CF=D7=CF=CD =D0=CF=C4=CF=D2=D7=C1=D4=D8 =D3=D7= =CF=C0 =D2=C5=D0=D5=D4=C1=C3=C9=C0. $ cat malloc.c=20 #include int main(int ac, const char const **av) { if (ac !=3D 2) return 1; return !malloc(atoi(av[1])); } $ uname -m i686 $ rpmquery glibc glibc-2.5-alt3 $ gcc -O2 -Wall -Werror malloc.c -o malloc $ strace -qce trace=3Dbrk,mmap2 ./malloc 1 =20 % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- nan 0.000000 0 3 brk nan 0.000000 0 6 mmap2 ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000000 9 total $ strace -qce trace=3Dbrk,mmap2 ./malloc $((1024*1024)) % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- nan 0.000000 0 1 brk nan 0.000000 0 7 mmap2 ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000000 8 total $ uname -m x86_64 $ rpmquery glibc glibc-2.5-alt3 $ gcc -O2 -Wall -Werror malloc.c -o malloc $ strace -qce trace=3Dbrk,mmap ./malloc 1 % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- nan 0.000000 0 7 mmap nan 0.000000 0 3 brk ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000000 10 total $ strace -qce trace=3Dbrk,mmap ./malloc $((1024*1024)) % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- nan 0.000000 0 8 mmap nan 0.000000 0 1 brk ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000000 9 total $ strings /lib*/ld-2.5.so |fgrep MALLOC_MMAP MALLOC_MMAP_MAX_ MALLOC_MMAP_THRESHOLD_ $ sed -n '/Update in 2006/,/\*\//p' glibc/malloc/malloc.c |wc -l 50 =F3=C5=D2=C7=C5=CA, =C2=D5=C4=D8=D4=C5 =C4=CF=C2=D2=D9, =D0=D2=CF=DE=D4=C9= =D4=C5 =DC=D4=C9 =CE=C5=D3=CB=CF=CC=D8=CB=CF =D3=D4=D2=CF=CB =CB=CF=CD=CD= =C5=CE=D4=C1=D2=C9=C5=D7, =D0=CF=D3=CC=C5 =DE=C5=C7=CF, =C5=D3=CC=C9 =C8=CF=D4=C9=D4=C5, =CD=CF=D6=CE=CF =D7=C5=D2=CE= =D5=D4=D8=D3=D1 =CB =D4=C5=CD=C5 =D2=C5=C1=CC=C9=DA=C1=C3=C9=C9 malloc =D7 = glibc. --=20 ldv --/NkBOFFp2J2Af1nK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFrAwRfKvmrJ41Nh4RAhSgAJ9WQ0+ik4HUuXx5fjfvuRZXDJCenQCgg9VF q4fXT4slJqtAuo4HTG1eYD8= =TmSd -----END PGP SIGNATURE----- --/NkBOFFp2J2Af1nK--