Re: Tcl under conditions of high memory usage.



billposer@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.
.



Relevant Pages

  • Re: Tcl under conditions of high memory usage.
    ... If doing something other than aborting on inability to get more memory ... one could use a memory manager that kept track of how ... course be one of the actions attempted by the event-handler. ...
    (comp.lang.tcl)
  • Re: Tcl under conditions of high memory usage.
    ... one could use a memory manager that kept track of how ... course be one of the actions attempted by the event-handler. ... Now it panics. ... so I'm not really understanding why you would want Tcl apps to crash ...
    (comp.lang.tcl)
  • Re: 2 Critical Alerts since I added more RAM
    ... the memory alert issue is ... Issues that are fixed in Exchange Server 2003 Service Pack 2 ... This newsgroup only focuses on SBS technical issues. ... the allocating more memory than usual alert issue ...
    (microsoft.public.windows.server.sbs)
  • Re: Large Amount of Memory Message
    ... Yesterday i noticed On my own SBS that one of the sqlserver instances was ... I doublechecked and noticed that It was the embedded version of SQL used ... It's alerting you if the server is using more memory than the amount ... I went in and set the alert threshold to 110 or 120% of the 30-day ...
    (microsoft.public.windows.server.sbs)
  • Re: 2 Critical Alerts since I added more RAM
    ... Exchange Server 2003 in a Small Business Server environment. ... 815372 How to Optimize Memory Usage in Exchange Server 2003 ... Click Change Alert Notifications, ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)