Re: Tcl under conditions of high memory usage.



On Nov 29, 3:16 am, "neuronst...@xxxxxxxxx" <neuronst...@xxxxxxxxx>
wrote:
is it normal for the app to just crash?


It is normal for a tcl application that uses up all of memory to
abort.

It is relatively simple to create examples of this. The error I see
when my sample runs out of memory is
"Not enough memory to allocate list". But of course, that message will
vary, depending on what request is being made when malloc returns an
error.

It would be nice if a stack were generated before the abort.

What are some alternatives that the language might take in this case?
Remember, once memory is exhasuted, one can't even guarantee a printed
output - since the attempt to puts the message out _could_ potentially
encounter the exhausted resource in the process of generating the
error. And you can't depend on having stdin, stdout, and stderr
attached to anything useful, though I suppose that particular actions
could take place if those were attached to something useful. Again
though, one has a process in an unstable situation at this point, so
useful actions might be at a minimum.
.



Relevant Pages

  • Re: Are there any plan to fix the memory leaks in TCL?
    ... The memory leak is present in 8.3 and 8.4 on all platforms. ... >Tcl, as well as the purify report (please attach it as a file, do not ... The Tcl maintainers take memory hygiene *very* ... and only reflect respect for the gravity of your report. ...
    (comp.lang.tcl)
  • Re: Determine calling function
    ... >> Now, if the work area is not sufficiently large, the function fails, ... > Since you plan to *abort* anyway then, ... > failures, at least the kind that lead to abort. ... can and do suffer from memory leaks. ...
    (comp.lang.c)
  • Re: A solution for the allocation failures problem
    ... without all that memory, or else, you *can't* solve the problem ... Immediately abort the program. ... Clean up and abort the program. ... as opposed to having the memory allocator ...
    (comp.lang.c)
  • Re: Memory used by tcl script
    ... Gerald W. Lester wrote: ... >> It seems to me as if the amount of allocated mEmory stays on the level ... Tcl does its own memory management and does not ... many don't like the high-water-mark facets of such allocators. ...
    (comp.lang.tcl)
  • Re: get RAM size
    ... Returns the total number of bytes in system memory. ... The total Memory in the JVM is NOT equal to the RAM size of the computer, it's usually much less, and depends on how much memory you give to java when you start it. ... I was told there's no way to get the total RAM size from a java app, that's why I was looking for such a function in Tcl. ...
    (comp.lang.tcl)