Solved

TCL Event Loop Memory Limiation

Posted on 2014-10-02
4
156 Views
Last Modified: 2014-10-17
Hi Experts,

What is the  limitation on the stack size associated with the TCL thread?
I'm facing a consistent problem with "allocation (malloc)" after some time of continuously running script.

I'm using the following initialization for the TCL framework:
	Tcl_FindExecutable(arg[0]);
	m_pTclInterp = Tcl_CreateInterp();
	Tcl_Preserve(m_pTclInterp);

Open in new window


Thanks.
0
Comment
Question by:Georges_Antoun
  • 2
4 Comments
 
LVL 33

Expert Comment

by:sarabande
ID: 40363546
allocation with malloc is heap memory. if you have issues it normally is not the absolute heap-size which is violated but that the requested contiguous heap-space could not be provided.

to solve the problem you should try to allocate always moderately sized (say 4k) chunks of memory on the heap which are all freed before a new cycle begins in your code. doing so the heap memory would not get defragmented too much and freed memory could be used again. in your current code you may check the calls to TCL_Preserve whether the memory preserved always is released properly and that the sizes of the allocations would not permanently increase (for example by always doubling the sizes when a dynamic buffer was full).

Sara
0
 

Accepted Solution

by:
Georges_Antoun earned 0 total points
ID: 40375719
Thank you guys.
We found the problem in a totally different place.
0
 

Author Closing Comment

by:Georges_Antoun
ID: 40386235
The root cause of the problem reported was found somewhere else.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Catch Cancellation error from objShell.Run 10 73
home folder path for users 4 57
Need help to rewrite script 3 64
User profile Size Report 3 63
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now