www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/06/16/14:13:49

Date: Wed, 14 Jun 95 23:20:47 PDT
Reply-To: pdasilva AT tpone DOT telepac DOT pt (P. da Silva)
From: pdasilva AT tpone DOT telepac DOT pt (P. da Silva)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: RE: malloc without malice

Most of the problems with malloc result from writing beyond the
end of the allocated block. The problem becomes visible later
after user freed the block and requests any other blocks.
Sooner or later, one of the requested blocks comes with a
bad pointer. To avoid this, compile malloc with RCHECK (and/or
DEBUG) defined. This makes the program abort when you free out
the ofensive block.
I hope this helps.
Paulo


- Raw text -


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