effect of free()

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Sep 15 07:54:31 AEST 1989


In article <1641 at levels.sait.edu.au> CCDN at levels.sait.edu.au (DAVID NEWALL) writes:
>I have a philosophy which I am going to share with you:  Avoid unnecessary
>restrictions.  Is it truly necessary that one not be able to *look* at a
>pointer without first knowing that it is valid?  I claim that it is not.

I'm of course well acquainted with that "philosophy".  However, in the
real world there are systems designed by people using different
philosophies.  In particular, there is a school of thought that says
machine architecture should be designed to assist in program reliability.
That school occasionally influences computer architectures such that
actions like merely continuing to shuffle around invalid pointers cause
an error trap to be taken.

Given that some systems do this, is it necessary for the C standard to
deliberately make implementation in such environments harder or slower
than necessary?  So far we haven't seen compelling reasons to.



More information about the Comp.lang.c mailing list