Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #17540

Re: Windows8

From mhx@iae.nl (Marcel Hendrix)
Subject Re: Windows8
Newsgroups comp.lang.forth
Message-ID <11799310928435@frunobulax.edu> (permalink)
Date 2012-11-25 10:56 +0200
References <2012Nov20.105552@mips.complang.tuwien.ac.at>
Organization Wanadoo

Show all headers | View raw


anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> "Elizabeth D. Rather" <erather@forth.com> writes:
>>On 11/19/12 4:25 AM, Anton Ertl wrote:
>> Well, it depends on the application.  In many cases I just allocate
>>> (with ALLOCATE or ALLOT, whatever is convenient), and never free it.
>>> For libraries where I don't know how it is used, I FREE ALLOCATEd
>>> memory, so that the library is more generally useful.  For some
>>> applications, limiting oneself to using ALLOT is appropriate.  Horses
>>> for courses.
>>
>>If you're not going to bother to FREE ALLOCATEd space, why are you using 
>>ALLOCATE? Why not just ALLOT?
>
>SwiftForth i386-Linux 3.2.1 28-Dec-2009 
>100000000 allocate throw  ok                                                   
>. -248688632  ok
>
>SwiftForth i386-Linux 3.2.1 28-Dec-2009 
>100000000 allot Dictionary full

What about (untested) 

  : ALLOT  DUP UNUSED U> IF 2* ALLOCATE THROW DP ! ELSE ALLOT ENDIF ;

Does this work for the existing Forth implementations?

gForth needs a small amount of work:

Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
: ALLOT  DUP UNUSED U> IF 2* ALLOCATE THROW DP ! ELSE ALLOT ENDIF ; redefined allot with ALLOT   ok
unused . 3980094  ok
8000000 allot  ok
dp ? 2108882952  ok
here 80 dump
7DB30008: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30018: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30028: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30038: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30048: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
 ok
unused ?
:6: Invalid memory address
unused >>>?<<<
Backtrace:
here 80 dump
7DB30008: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30018: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30028: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30038: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30048: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
 ok
s" hello" here place  ok
here 80 dump
7DB30008: 05 68 65 6C  6C 6F 00 00 - 00 00 00 00  00 00 00 00  .hello..........
7DB30018: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30028: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30038: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
7DB30048: 00 00 00 00  00 00 00 00 - 00 00 00 00  00 00 00 00  ................
 ok
: .hello cr ." Hello, world!" ;
:10: Dictionary overflow
: >>>.hello<<< cr ." Hello, world!" ;
Backtrace:
$7EBA5F6C throw
$7EBA5FE0 allot
$7EBA62CC ,
$7EBA6338 header,
$7EBA7958 header

-marcel

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Windows8 visualforth@rocketmail.com - 2012-11-02 08:41 -0700
  Re: Windows8 Brad Eckert <hwfwguy@gmail.com> - 2012-11-02 11:12 -0700
  Re: Windows8 visualforth@rocketmail.com - 2012-11-06 09:05 -0800
    Re: Windows8 Jason Damisch <jasondamisch@yahoo.com> - 2012-11-12 07:10 -0800
      Re: Windows8 stephenXXX@mpeforth.com (Stephen Pelc) - 2012-11-12 17:27 +0000
    Re: Windows8 visualforth@rocketmail.com - 2012-11-21 17:48 -0800
  Re: Windows8 visualforth@rocketmail.com - 2012-11-07 20:44 -0800
  Re: Windows8 Jason Damisch <jasondamisch@yahoo.com> - 2012-11-12 07:15 -0800
    Re: Windows8 Brad Eckert <hwfwguy@gmail.com> - 2012-11-12 07:59 -0800
    Re: Windows8 "Elizabeth D. Rather" <erather@forth.com> - 2012-11-12 07:55 -1000
      Re: Windows8 "Ed" <invalid@nospam.com> - 2012-11-14 20:04 +1100
        Re: Windows8 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-14 17:01 +0000
          Re: Windows8 "Ed" <invalid@nospam.com> - 2012-11-18 11:14 +1100
            Re: Windows8 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-19 14:25 +0000
              Re: Windows8 "Elizabeth D. Rather" <erather@forth.com> - 2012-11-19 08:09 -1000
                Re: Windows8 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-20 09:55 +0000
                Re: Windows8 mhx@iae.nl (Marcel Hendrix) - 2012-11-25 10:56 +0200
                Re: Windows8 Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-25 16:46 +0100
            Re: Windows8 Doug Hoffman <glidedog@gmail.com> - 2012-11-19 16:21 -0500
              Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-19 13:46 -0800
                Re: Windows8 Doug Hoffman <glidedog@gmail.com> - 2012-11-19 17:05 -0500
                Re: Windows8 "Elizabeth D. Rather" <erather@forth.com> - 2012-11-19 12:14 -1000
                Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-19 14:30 -0800
                Re: Windows8 "Elizabeth D. Rather" <erather@forth.com> - 2012-11-19 12:53 -1000
                Re: Windows8 Doug Hoffman <glidedog@gmail.com> - 2012-11-19 17:44 -0500
                Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-19 14:52 -0800
                GC (was Re: Windows8) Doug Hoffman <glidedog@gmail.com> - 2012-11-26 11:44 -0500
                Re: GC Paul Rubin <no.email@nospam.invalid> - 2012-11-26 11:44 -0800
                Re: GC Doug Hoffman <glidedog@gmail.com> - 2012-11-28 06:35 -0500
                Re: GC Paul Rubin <no.email@nospam.invalid> - 2012-11-29 11:58 -0800
                Re: GC albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-30 01:46 +0000
                Re: GC Paul Rubin <no.email@nospam.invalid> - 2012-11-29 21:14 -0800
                Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-19 14:42 -0800
                Re: Windows8 Doug Hoffman <glidedog@gmail.com> - 2012-11-19 17:56 -0500
                Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-19 15:14 -0800
                Re: Windows8 Doug Hoffman <glidedog@gmail.com> - 2012-11-19 18:45 -0500
                Re: Windows8 "Elizabeth D. Rather" <erather@forth.com> - 2012-11-19 14:18 -1000
                Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-19 16:18 -0800
                Re: Windows8 Doug Hoffman <glidedog@gmail.com> - 2012-11-19 19:01 -0500
                Re: Windows8 "Elizabeth D. Rather" <erather@forth.com> - 2012-11-19 12:58 -1000
                Re: Windows8 Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-20 02:23 +0100
                Re: Windows8 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-20 10:48 +0000
                Re: Windows8 Alex McDonald <blog@rivadpm.com> - 2012-11-20 07:56 -0800
                Re: Windows8 anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-21 15:03 +0000
                Re: Windows8 Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-23 05:58 -0800
                Re: Windows8 Mark Wills <forthfreak@gmail.com> - 2012-11-20 02:13 -0800
                Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-20 08:57 -0800
                Re: Windows8 "David N. Williams" <williams@umich.edu> - 2012-11-20 16:56 -0500
                Re: Windows8 mhx@iae.nl (Marcel Hendrix) - 2012-11-25 11:20 +0200
    Re: Windows8 rickman <gnuarm@gmail.com> - 2012-11-14 16:36 -0500
      Re: Windows8 "Elizabeth D. Rather" <erather@forth.com> - 2012-11-14 12:12 -1000
        Re: Windows8 rickman <gnuarm@gmail.com> - 2012-11-14 17:46 -0500
          Re: Windows8 "Elizabeth D. Rather" <erather@forth.com> - 2012-11-14 13:12 -1000
            Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-14 18:12 -0800
            Re: Windows8 rickman <gnuarm@gmail.com> - 2012-11-15 13:55 -0500
              Re: Windows8 RR <freedomspyder@gmail.com> - 2012-11-15 16:03 -0800
                Re: Windows8 rickman <gnuarm@gmail.com> - 2012-11-15 21:54 -0500
                Re: Windows8 RR <freedomspyder@gmail.com> - 2012-11-15 19:26 -0800
                Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-15 19:27 -0800
                Re: Windows8 Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-16 17:45 +0100
                Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-16 09:10 -0800
                Re: Windows8 Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-16 22:34 +0100
                Re: Windows8 Andy Valencia <vandys@vsta.org> - 2012-11-16 18:06 +0000
                Re: Windows8 Paul Rubin <no.email@nospam.invalid> - 2012-11-16 11:09 -0800
                Re: Windows8 Spam@ControlQ.com - 2012-11-16 15:18 -0500
        Re: Windows8 visualforth@rocketmail.com - 2012-11-15 00:19 -0800
          Re: Windows8 "Elizabeth D. Rather" <erather@forth.com> - 2012-11-14 22:55 -1000
          Re: Windows8 albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-15 12:20 +0000
            Re: Windows8 visualforth@rocketmail.com - 2012-11-15 08:32 -0800
            Re: Windows8 kenney@cix.compulink.co.uk - 2012-11-16 04:51 -0600
              Re: Windows8 stephenXXX@mpeforth.com (Stephen Pelc) - 2012-11-16 13:46 +0000
              Re: Windows8 visualforth@rocketmail.com - 2012-11-16 08:12 -0800
  Re: Windows8 the_gavino_himself <visphatesjava@gmail.com> - 2012-11-29 00:16 -0800

csiph-web