Re: Tcl under conditions of high memory usage.
- From: "neuronstorm@xxxxxxxxx" <neuronstorm@xxxxxxxxx>
- Date: Thu, 29 Nov 2007 20:48:08 -0800 (PST)
On Nov 30, 12:49 am, miguel <mso...@xxxxxxxxxxxx> wrote:
billpo...@xxxxxxxxxxxx wrote:
On Nov 29, 8:50 am, "Larry W. Virden" <lvir...@xxxxxxxxx> wrote:
What are some alternatives that the language might take in this case?
If doing something other than aborting on inability to get more memory
is important, one could use a memory manager that kept track of how
much memory it had left and sent an alert (in the case of tcl, I
suppose an event would be the most useful) when it got down to a
certain level. The event-handler could then take appropriate clean-up
action before shutting down, or, conceivably, free enough memory to
continue.
This is only possible, however, if the interpreter pre-allocates a
chunk of memory to work with - otherwise there is no way to know how
much is left. If it uses as the measure of "how much is left" what is
left in the system, it will be unreliable as another process may
acquire it in the meantime. An attempt to expand the arena could of
course be one of the actions attempted by the event-handler.
The general situation is indeed as bad as you describe it.
What we could do (as an example) is: when the user requests
lappend x $foo
if the system cannot alloc enough memory to perform the command, just
return an error. Now it panics.
As I said - it is not a small change. I guess we will get around to
doing that eventually.- Hide quoted text -
- Show quoted text -
Why does it have to error or panic?
Why can't it just wait?
It seems to me that a low memory condition on a machine may just be a
transient state,
so I'm not really understanding why you would want Tcl apps to crash
or produce an error.
J
.
- Follow-Ups:
- Re: Tcl under conditions of high memory usage.
- From: Alexandre Ferrieux
- Re: Tcl under conditions of high memory usage.
- References:
- Tcl under conditions of high memory usage.
- From: neuronstorm@xxxxxxxxx
- Re: Tcl under conditions of high memory usage.
- From: Larry W. Virden
- Re: Tcl under conditions of high memory usage.
- From: billposer
- Re: Tcl under conditions of high memory usage.
- From: miguel
- Tcl under conditions of high memory usage.
- Prev by Date: Re: Passing literal strings to Tcl_Eval.
- Next by Date: Incr Tcl: Something like a scoped object
- Previous by thread: Re: Tcl under conditions of high memory usage.
- Next by thread: Re: Tcl under conditions of high memory usage.
- Index(es):
Relevant Pages
|