Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Sep 2008 02:06:52 +0200
From:      Mel <fbsd.questions@rachie.is-a-geek.net>
To:        freebsd-questions@freebsd.org, trashy_bumper@yahoo.com
Subject:   Re: Segmentation fault when free
Message-ID:  <200809210206.52409.fbsd.questions@rachie.is-a-geek.net>
In-Reply-To: <940047.3009.qm@web110507.mail.gq1.yahoo.com>
References:  <940047.3009.qm@web110507.mail.gq1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 20 September 2008 13:46:23 Nash Nipples wrote:


> can someone please explain to me what happens to the allocated memory
> called within a function assigned to its local pointer after this function
> ends

Ok - let's see if I get this right:
- the allocated memory
- called within a function
- assigned to a local pointer

Any malloc'ed memory is application global accessible. Assigning a pointer to 
a variable doesn't allocate memory (the compiler and runtime libraries 
already setup storage for the variable, at declaration time). So, I have no 
idea what you mean with the "called within a function" part.

-- 
Mel

Problem with today's modular software: they start with the modules
    and never get to the software part.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809210206.52409.fbsd.questions>