Article View: comp.os.os2.programmer
Article #1120Re: malloc causes a segmentation violation!?
From: Michael Harris
Date: Wed, 19 Aug 1992 16:57
Date: Wed, 19 Aug 1992 16:57
15 lines
1338 bytes
1338 bytes
mn87504@cs.tut.fi (Naatula Mika) writes:
>I thought that OS/2 could detect writes to non-allocated areas and
>give me a segmentation fault right away. Like it usually does.
What you have to understand is that the area IS allocated as far as the
operating system is concerned. It is allocated to your process. Since your
process owns it, the operating system is very happy to let you write there.
Memory protection in OS/2 protects one process from another... not a process
from itself.
______________________________________________________________________________
Michael Harris - harris@catt.ncsu.edu or harris@carvm3.vnet.ibm.com
System Administrator, Computer & Technologies Theme Program, NC State Univ.
(My opinions are my own and do not represent those of NCSU or IBM Corporation)
Technical Details
Message-ID:
<harris.714243433@garfield.catt.ncsu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!garfield.catt.ncsu.edu!harrisReferences:
<1992Aug18.143135.6259@cc.tut.fi> <3dfy6bq@rpi.edu> <1992Aug19.155648.6210@funet.fi>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer,comp.lang.c Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!garfield.catt.ncsu.edu!harris From: harris@garfield.catt.ncsu.edu (Michael Harris) Subject: Re: malloc causes a segmentation violation!? Message-ID: <harris.714243433@garfield.catt.ncsu.edu> Sender: news@ncsu.edu (USENET News System) Organization: North Carolina State University References: <1992Aug18.143135.6259@cc.tut.fi> <3dfy6bq@rpi.edu> <1992Aug19.155648.6210@funet.fi> Date: Wed, 19 Aug 1992 16:57:13 GMT Lines: 15