-
June 21st, 2011, 03:22 PM
#1
C memory segmentation fault
Hi,
Im getting the following segmentation fault from some C code on x86
Code:
(gdb) bt full
#0 0xfeb3487a in _malloc_unlocked () from /usr/lib/libc.so.1
No symbol table info available.
#1 0xfeb34704 in malloc () from /usr/lib/libc.so.1
No symbol table info available.
If I can rule out something wrong in the stack, then since this seg fault
happens in memory management , then maybe its the heap that at fault.
RESOLVED: it did turn out to be heap related.
Last edited by Moore; June 23rd, 2011 at 03:35 AM.
Reason: removing unecessary detail and marked as resolved.
-
June 21st, 2011, 03:40 PM
#2
Re: C memory segmentation fault
The first thing to check is that you aren't running out of memory. A glance at top should show you the current memory usage. Is this a 32-bit or a 64-bit system?
-
June 21st, 2011, 03:56 PM
#3
Re: C memory segmentation fault
Hello,
Thanks for reply.
This is 32 bit binary.
No problem with memory availability.
I have seen the process dump core with core size well less that 1G (which is significantly smaller than max ~4G process address space.).
Have not seen the process grow greater than 600M before core.
-
June 21st, 2011, 04:01 PM
#4
Re: C memory segmentation fault
Indeed that does not seem to be the problem, then. In practice, a 32-bit process will run into memory trouble only once it is using 1.5-2GB on Windows systems, and perhaps a bit more on Linux.
-
June 21st, 2011, 04:07 PM
#5
Re: C memory segmentation fault
Last edited by Moore; June 23rd, 2011 at 05:12 PM.
Reason: topic resolved.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|