Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #47151
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: RESIZE boundary conditions |
| Date | 2016-05-15 17:08 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2016May15.190851@mips.complang.tuwien.ac.at> (permalink) |
| References | <2016May15.132631@mips.complang.tuwien.ac.at> <efa961ac-66c0-4b25-a043-4f419ab2879c@googlegroups.com> |
ruvim.pinka@gmail.com writes:
>On Sunday, May 15, 2016 at 3:36:37 PM UTC+3, Anton Ertl wrote:
>
>> That brings me to my main question: Are there Forth programs that fail
>> if "addr 0 RESIZE" returns 0 0?
>
>It seems that standard program can FREE addr that is returned by RESIZE without additional checks. So if RESIZE can return ( 0 0 ), "0 FREE" should return 0. Otherwise such standard program will fail on FREE.
Good point. Standard FREE does not specify an action of 0 FREE. C99
and C11 specify for free(void *ptr):
|If ptr is a null pointer, no action occurs.
So given that most (all?) Forth systems implement FREE by calling
free(), this might be another place where we probably should tighten
the standard based on common practice.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2016: http://www.euroforth.org/ef16/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
RESIZE boundary conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-15 11:26 +0000
Re: RESIZE boundary conditions ruvim.pinka@gmail.com - 2016-05-15 06:46 -0700
Re: RESIZE boundary conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-15 17:08 +0000
Re: RESIZE boundary conditions november.nihal@gmail.com - 2016-05-15 09:13 -0700
Re: RESIZE boundary conditions Albert van der Horst <albert@cherry.spenarnc.xs4all.nl> - 2016-05-15 18:23 +0000
Re: RESIZE boundary conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-16 13:13 +0000
Re: RESIZE boundary conditions Hans Bezemer <the.beez.speaks@gmail.com> - 2016-05-16 15:23 +0200
Re: RESIZE boundary conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-16 14:01 +0000
Re: RESIZE boundary conditions hughaguilar96@gmail.com - 2016-05-16 14:14 -0700
Re: RESIZE boundary conditions Albert van der Horst <albert@cherry.spenarnc.xs4all.nl> - 2016-05-15 18:13 +0000
Re: RESIZE boundary conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-05-16 10:32 +0000
Re: RESIZE boundary conditions Albert van der Horst <albert@cherry.spenarnc.xs4all.nl> - 2016-05-16 22:38 +0000
Re: RESIZE boundary conditions Hans Bezemer <the.beez.speaks@gmail.com> - 2016-05-16 14:54 +0200
csiph-web