Hi all,
I am getting a segmentation fault when trying to call 'malloc' from my code(stack trace given below).
Can someone tell me the reason for getting this crash?
Regards,
I am getting a segmentation fault when trying to call 'malloc' from my code(stack trace given below).
Can someone tell me the reason for getting this crash?
Regards,
Code:
----stack-trace----------
Program terminated with signal 11, Segmentation fault.
#0 0x88b330af in malloc_pages (size=<value optimized out>) at ../../../../src/bsd/lib/libc/stdlib/malloc.c:574
574 page_dir[index] = MALLOC_FIRST;
[New Thread 0x8880000 (LWP 100172)]
(gdb) bt
#0 0x88b330af in malloc_pages (size=<value optimized out>) at ../../../../src/bsd/lib/libc/stdlib/malloc.c:574
#1 0x88b333f1 in imalloc (size=6056076) at ../../../../src/bsd/lib/libc/stdlib/malloc.c:737
#2 0x88b34049 in pubrealloc (ptr=0x0, size=6056076, func=0x88b9ae09 " in malloc():") at ../../../../src/bsd/lib/libc/stdlib/malloc.c:1126
#3 0x88b34234 in __malloc (size=6056076) at ../../../../src/bsd/lib/libc/stdlib/malloc.c:1156