This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
mmalloc problems
- From: Antonio SJ Musumeci <bile at landofbile dot com>
- To: gdb at sources dot redhat dot com
- Date: Mon, 20 Sep 2004 13:56:03 -0700
- Subject: mmalloc problems
Linux 2.6.6 vanilla, gdb 6.2.1, gcc 3.3.4 --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-shared --disable-nls
mapped_data does not exist prior
{
fd = open("mapped_data", O_CREAT|O_RDWR, S_IRWXU);
md = mmalloc_attach(fd, NULL);
data = mmalloc(md, 0x5000);
mmalloc_detach(md);
}
results in
./a.out: relocation error: ./a.out: symbol getpagesize, version GLIBC_2.0 not
defined in file libc.so.6 with link time reference
if i replace data=mmalloc(md, 0x5000) with:
i =0;
while(++i)
{
data = mmalloc(md, 1);
fprintf(stderr, "%d\n", i);
}
gets upto 29696 (every time) then
#0 0x40053b61 in vfprintf () from /lib/libc.so.6
#1 0x401167c0 in _IO_2_1_stdout_ () from /lib/libc.so.6
#2 0x0804b024 in _IO_stdin_used ()
#3 0xbffffc78 in ?? ()
#4 0xbffffc98 in ?? ()
#5 0x08048836 in main (argc=1074882496, argv=0x804b024) at test.c:22
any ideas? am I using it wrong?