C programming and freeing memory - help!

From: PSI, James Woodside (woodside_at_mitre.org)
Date: 01/21/04


Date: Wed, 21 Jan 2004 13:28:11 -0500

Hello,

I'm moving an application over from a solaris platform to linux. When
the program attempts to free previously allocated memory, I get a
segmentation fault. It ran fine under solaris. The section of code in
question is a loop where an unsigned int pointer is allocated memory and
used, and then freed. This works fine for the initial pass through the
loop, but the second time through the loop, it seg faults on the freeing
of this memory. Is there something that's needed that I'm neglecting
that wasn't needed (or overlooked) when running under solaris? Thanks.

-Jim



Relevant Pages

  • Re: C programming and freeing memory - help!
    ... >segmentation fault. ... It ran fine under solaris. ... >question is a loop where an unsigned int pointer is allocated memory and ... >loop, but the second time through the loop, it seg faults on the freeing ...
    (comp.os.linux.development.apps)
  • Re: C programming and freeing memory - help!
    ... > segmentation fault. ... It ran fine under solaris. ... > question is a loop where an unsigned int pointer is allocated memory and ... > loop, but the second time through the loop, it seg faults on the freeing ...
    (comp.os.linux.development.apps)
  • Re: C programming and freeing memory - help!
    ... >> When the program attempts to free previously allocated memory, ... It ran fine under solaris. ... >> code in question is a loop where an unsigned int pointer is allocated ... >> memory and used, and then freed. ...
    (comp.os.linux.development.apps)
  • Re: C programming and freeing memory - help!
    ... >>segmentation fault. ... It ran fine under solaris. ... >>question is a loop where an unsigned int pointer is allocated memory and ...
    (comp.os.linux.development.apps)
  • Re: C programming and freeing memory - help!
    ... > segmentation fault. ... It ran fine under solaris. ... > question is a loop where an unsigned int pointer is allocated memory and ...
    (comp.os.linux.development.apps)