www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/20/20:14:05

From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: free() ?
Date: 20 Feb 1997 20:48:01 GMT
Organization: Oxford University
Lines: 17
Message-ID: <5eida1$dft@news.ox.ac.uk>
References: <330CBD87 DOT 5B1F AT post DOT comstar DOT ru>
NNTP-Posting-Host: mc31.merton.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Dim Zegebart (zager AT post DOT comstar DOT ru) wrote:

: What will happens in line free(&x) ? Is it correct ?
: (I know, it's not correct. But what will happens ?)

If something's illegal, the results are usually 'undefined', and will depend
upon compiler and possibly platform.

If in doubt, try it out. I'm in a linux boot at the moment, and it produces
a segmentation fault. Under DOS this is likely to be a SIGSEGV.

I should let the compiler deal with freeing up local variable space - it
knows what it's doing :)

-- 
George Foot <gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk>
Merton College, Oxford.

- Raw text -


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