From owner-freebsd-questions@FreeBSD.ORG Sun Sep 21 00:07:07 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EACC1106564A for ; Sun, 21 Sep 2008 00:07:07 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id BE6DC8FC27 for ; Sun, 21 Sep 2008 00:07:07 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id 6BFB3AFBC01; Sat, 20 Sep 2008 16:07:06 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org, trashy_bumper@yahoo.com Date: Sun, 21 Sep 2008 02:06:52 +0200 User-Agent: KMail/1.9.7 References: <940047.3009.qm@web110507.mail.gq1.yahoo.com> In-Reply-To: <940047.3009.qm@web110507.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809210206.52409.fbsd.questions@rachie.is-a-geek.net> Cc: Subject: Re: Segmentation fault when free X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Sep 2008 00:07:08 -0000 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.