10 Sep 2004 21:10
mmalloc
Antonio SJ Musumeci <bile <at> landofbile.com>
2004-09-10 19:10:15 GMT
2004-09-10 19:10:15 GMT
This may not be the correct place to ask but i'm not sure where else to.
I just ran across mmalloc and it's just what I need for a project i'm
working on. But i'm having some problems.
1. if i attempt to allocate more than 0x4000 i get this when i detach
./a.out: relocation error: ./a.out: symbol munmap, version GLIBC_2.0 not
defined in file libc.so.6 with link time reference
2. If i incrementally allocate memory... after say 1KB-2KB it segfaults
0x08049a4d in mmalloc (md=0x40015000, size=4096) at mmalloc.c:298
298 mdp -> heapinfo[mdp -> heapinfo[block].free.prev].free.next
this is all i'm doing in my sample program
fd = open("mapped_data", O_CREAT|O_RDWR, S_IRWXU);
md = mmalloc_attach(fd, NULL);
data = mmalloc(md, 0x1000);
mmalloc_detach(md);
gcc-3.3.4
glibc-2.3.3
gdb-6.2
what am i missing? or is mmalloc just too old?
RSS Feed