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


Groups > comp.lang.forth > #20625

Re: Quotations revisited

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail
From David Kuehling <dvdkhlng@gmx.de>
Newsgroups comp.lang.forth
Subject Re: Quotations revisited
Date Wed, 13 Mar 2013 11:44:54 +0100
Lines 29
Message-ID <87zjy77f4p.fsf@mosquito.pool> (permalink)
References <00808889968435@frunobulax.edu> <50040282.189860346@192.168.0.50> <771c3aa0-0b95-48af-b0fb-c6ae6269a266@googlegroups.com> <874ngf8x0a.fsf@mosquito.pool> <t6OdnTH_R9Uz1N3MnZ2dnUVZ_oKdnZ2d@supernews.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace news.uni-berlin.de Nq7ctZvQ8AH7Uuspj4KNGQCFir1Fv4mLMBYVMAwZj2NNvN2Os=
Cancel-Lock sha1:1tPHl1Ku09v5odb6uxdkpqVJ7is=
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
Xref csiph.com comp.lang.forth:20625

Show key headers only | View raw


>>>>> "Andrew" == Andrew Haley <andrew29@littlepinkcloud.invalid> writes:

> David Kuehling <dvdkhlng@gmx.de> wrote:

>>> 2.1. Closures assume run-time creation of execution tokens.
>> 
>> Doesn't this creation of execution tokens create a memory leak?

> You'd have to FREE them yourself.  There's no good reason not to allow
> the user to redefine both FREE and ALLOCATE words for closures.  An
> alternative would be to reference count them.  The onus would then be
> on the user to use DUP-CLOSURE and EXECUTE-CLOSURE rather than DUP and
> EXECUTE.  This would be a pain, but perhaps better than manual
> FREEing.

I won't feel comfortable forcing tranpolines to reside on the heap.  On
some architectures/systems they may need to be placed in different
executable memory regions, that's why the call for a new word to free
them.

As trampolines are small in size, providing a word to create a copy of a
trampoline may be the better alternative to doing reference-counting.  

cheer,

David
-- 
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

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


Thread

Re: Quotations revisited Michael L Gassanenko <m_l_g3@yahoo.com> - 2013-03-13 01:54 -0700
  Re: Quotations revisited Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-13 04:21 -0500
    Re: Quotations revisited Michael L Gassanenko <m_l_g3@yahoo.com> - 2013-03-13 03:36 -0700
      Re: Quotations revisited Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-13 07:14 -0500
    Re: Quotations revisited anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-13 11:55 +0000
      Re: Quotations revisited Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-13 07:20 -0500
        Re: Quotations revisited anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-13 14:36 +0000
      Re: Quotations revisited albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-13 13:01 +0000
        Re: Quotations revisited anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-13 14:21 +0000
  Re: Quotations revisited David Kuehling <dvdkhlng@gmx.de> - 2013-03-13 10:33 +0100
    Re: Quotations revisited Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-13 04:41 -0500
      Re: Quotations revisited David Kuehling <dvdkhlng@gmx.de> - 2013-03-13 11:44 +0100
  Re: Quotations revisited Lars Brinkhoff <lars.spam@nocrew.org> - 2013-03-13 11:23 +0100
  Re: Quotations revisited Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-13 12:52 +0100
    Re: Quotations revisited Lars Brinkhoff <lars.spam@nocrew.org> - 2013-03-14 09:47 +0100
      Re: Quotations revisited Sieur de Bienville <morrimichael@gmail.com> - 2013-03-14 10:45 -0700
        Re: Quotations revisited Lars Brinkhoff <lars.spam@nocrew.org> - 2013-03-14 19:41 +0100
          Re: Quotations revisited Sieur de Bienville <morrimichael@gmail.com> - 2013-03-14 12:58 -0700
    Re: Quotations revisited Michael L Gassanenko <m_l_g3@yahoo.com> - 2013-03-14 23:09 -0700

csiph-web