Re: Tcl under conditions of high memory usage.



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



Relevant Pages

  • Re: Tcl under conditions of high memory usage.
    ... 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, ... 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: Memory Management
    ... The program is a bunch of DLLs. ... I'm still using the CRT's malloc and free to allocate memory. ... If the application makes a memory allocation request, ... I have implemented a memory manager for some SDK I'm working on (a ...
    (microsoft.public.vc.language)
  • Re: Memory fragmentation
    ... - On single CPU machine the standard memory manager is absolutely adeguate ... compared to single CPU machine. ... b - If you have a single very CPU and memory bound process a third party ...
    (borland.public.delphi.non-technical)
  • Re: A Layered Kernel: Proposal
    ... > requests is rather trivial for a memory manager. ... >>there is one in the kernel, ...
    (Linux-Kernel)