B
Bin Lu
I keep getting this malloc problem when my program tries to allocate
memory for some pointer. The statement is like:
rsv_cache = (rsvcache *) malloc (sizeof(rsvcache));
It goes through the function with this statement several times and seems
that it has successfully allocated the memory. and then at some
iteration, it just gets this segmentation fault.
The gdb gives the following message:
Program received signal SIGSEGV, Segmentation fault.
0x4022e221 in chunk_alloc (ar_ptr=0x402e2620, nb=48) at malloc.c:2878
2878 malloc.c: No such file or directory.
in malloc.c
And when I try to run the program with some other data, it gets exactly
the same problem but at another malloc statement in my code.
Any idea what this is about and how to solve it?? I'd appreciate it very
much if you can give me a hint!!
Bin Lu
memory for some pointer. The statement is like:
rsv_cache = (rsvcache *) malloc (sizeof(rsvcache));
It goes through the function with this statement several times and seems
that it has successfully allocated the memory. and then at some
iteration, it just gets this segmentation fault.
The gdb gives the following message:
Program received signal SIGSEGV, Segmentation fault.
0x4022e221 in chunk_alloc (ar_ptr=0x402e2620, nb=48) at malloc.c:2878
2878 malloc.c: No such file or directory.
in malloc.c
And when I try to run the program with some other data, it gets exactly
the same problem but at another malloc statement in my code.
Any idea what this is about and how to solve it?? I'd appreciate it very
much if you can give me a hint!!
Bin Lu