delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/03/02/11:30:08

From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problem with malloc/free
Date: Sun, 02 Mar 2003 16:06:04 +0000
Lines: 18
Message-ID: <3E622BEC.1B25C848@phekda.freeserve.co.uk>
References: <3E6225AD DOT 1341CC2B AT ec-red DOT com>
NNTP-Posting-Host: 62.136.66.76
Mime-Version: 1.0
X-Trace: newsg2.svr.pol.co.uk 1046621760 14230 62.136.66.76 (2 Mar 2003 16:16:00 GMT)
NNTP-Posting-Date: 2 Mar 2003 16:16:00 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello.

Sergio Aguayo wrote:
> The problem is the following: i'm using DJGPP (the version available
> right now), i'm using malloc with an array of pointers (20 char *) for
> loading a file (a total of 20 files at once). The problem comes when i
> call free to release that memory, there occures a SIGSEGV signal. I'm
> also using allegro.

It would help if you posted some code.

Perhaps you have overrun the array of pointers? This will cause memory
corruption, which can lead to free segfaulting (SIGSEGV).

Regards,

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019