Message-ID: <35122FEE.3C46@acadia.net> Date: Fri, 20 Mar 1998 03:59:26 -0500 From: Scott Warner MIME-Version: 1.0 To: THIERRY DOT T DOT I DOT IMMORDINO AT TSI DOT thomson DOT fr CC: djgpp AT delorie DOT com Subject: Re: Memory protection References: <00025A71.MAI*/G=THIERRY/I=TI/S=IMMORDINO/O=TSI/PRMD=THOMSON/ADMD=ATLAS/C=FR/@MHS> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk THIERRY DOT T DOT I DOT IMMORDINO AT TSI DOT thomson DOT fr wrote: > > Hi, > > How can I protect, some part of the memory (variables, task stack, ..) from > overwrites ? (mprotect perhaps ) > > Thierry I believe this is the function of malloc() and new, in C and C++ respectively. Both return pointers to an allocated area of memory of the size requested. If the memory is unavailable, malloc() and new return NULL pointers. Without this areas of memory can easily be overwritten.