From: sr@altlinux.ru
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] q: glibc malloc s*cks?
Date: Mon, 15 Jan 2007 23:33:03 +0200
Message-ID: <20070115213303.GA6086@osdn.org.ua> (raw)
In-Reply-To: <20070115141342.GA26404@basalt.office.altlinux.org>
On Mon, Jan 15, 2007 at 05:13:42PM +0300, Dmitry V. Levin wrote:
> Скажите sr@, что glibc malloc уже давно использует mmap.
> См. тж. http://sourceware.org/ml/libc-alpha/2006-11/msg00061.html
Агащазблин.
$ echo "int main() { return malloc( 1) ? 0 : 1; }" > 1.c
$ gcc 1.c
$ strace ./a.out
execve("./a.out", ["./a.out"], [/* 49 vars */]) = 0
brk(0) = 0x804a000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=62887, ...}) = 0
mmap2(NULL, 62887, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7f82000
close(4) = 0
open("/lib/libc.so.6", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\232b\1"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=1167868, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f81000
mmap2(NULL, 1173764, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7e62000
mmap2(0xb7f7b000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x119) = 0xb7f7b000
mmap2(0xb7f7e000, 10500, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f7e000
close(4) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e61000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e616c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7f7b000, 4096, PROT_READ) = 0
munmap(0xb7f82000, 62887) = 0
brk(0) = 0x804a000
brk(0x806b000) = 0x806b000
exit_group(0) = ?
Process 6119 detached
$ rpm -q glibc
glibc-2.5-alt3
next prev parent reply other threads:[~2007-01-15 21:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-15 13:59 Michael Shigorin
2007-01-15 14:13 ` Dmitry V. Levin
2007-01-15 18:01 ` Michael Shigorin
2007-01-15 21:33 ` sr [this message]
2007-01-15 22:37 ` Michael Shigorin
2007-01-15 23:18 ` sr
2007-01-16 1:26 ` Dmitry V. Levin
2007-01-16 9:35 ` Michael Shigorin
2007-01-16 17:46 ` [devel] [JT] " Денис Смирнов
2007-01-15 23:19 ` [devel] q: " Dmitry V. Levin
2007-01-15 19:19 ` Денис Смирнов
2007-01-15 21:38 ` sr
2007-01-15 22:22 ` Konstantin A. Lepikhov
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=20070115213303.GA6086@osdn.org.ua \
--to=sr@altlinux.ru \
--cc=devel@lists.altlinux.org \
/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
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git