Re: Tcl under conditions of high memory usage.
- From: miguel <msofer@xxxxxxxxxxxx>
- Date: Thu, 29 Nov 2007 13:15:43 -0300
neuronstorm@xxxxxxxxx wrote:
Hi,
I have at various times had core dumps with Tcl under conditions of
fairly high memory usage, both on windows & FreeBSD.
I hardly expect applications to run properly when there is little free
memory - but is it normal for the app to just crash?
I sometimes get an error reported, something like: can't allocate
memory for tcl_listobj
It would help to get the precise message as my grep has no -like option.
Other daemons & applications will just grind their way along slowly -
whilst the system uses it's swap space heavily - but my Tcl daemons
just crash, well before the machine seems really overloaded.
Sorry for the lack of specific figures and scientific analysis - It's
just an impression I get about the behaviour of Tcl under load at this
stage, and I'd like to know what the expected behaviour is, or if
others have similar experiences.
Tcl will panic on many OOM conditions - something we have to work at
improving. The panic occurs when Tcl_Alloc fails to allocate the
requested size (this boils down to "when malloc fails to allocate the
requested size").
Depending on what you are doing, this might occur on an unloaded system too:
while 1 {set a([incr i]) $i
for example will swap until it dies with a malloc failure on a fresh
system. If you're in a hurry, the following does the same but faster:
set a {}; while 1 {lappend a $a}
So, apart from Tcl's suboptimal behaviour, your statement that "my Tcl
daemons just crash, well before the machine seems really overloaded"
might hint at some leak in your daemons.
.
- References:
- Tcl under conditions of high memory usage.
- From: neuronstorm@xxxxxxxxx
- Tcl under conditions of high memory usage.
- Prev by Date: Re: Using a tcl interpreter inside a DLL?
- Next by Date: Re: Tcl under conditions of high memory usage.
- Previous by thread: Tcl under conditions of high memory usage.
- Next by thread: Re: Tcl under conditions of high memory usage.
- Index(es):
Relevant Pages
|