Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: string TopFunctDefined =
Topic Summary: Eval_ Revisited
Created On: 3-May-2005 22:06
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 3-May-2005 22:06
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Shamelessly copying from Tiplady and Tuskey, this is my first venture into the eval_, evalTop_, and return_ functions. See attached.

eval_ successfully returns a value to the main using return_. return_ is setting a value and can be changed before the end of the evaluated script (notice "FirstReturnVal" is ignored).

It correctly defines function TopFunct() at the "top context", and is subsequenty used by the evaluated string EvalDefined and also by the Main program. It remains defined even when you comment out the evalTop_ line 6 and run it again. However, if you change the definition of TopFunct(), perhaps by modifying line 3 to read ".. In TopFunctChanged..", the original TopFunct gets called and the new one does not.

TopFunct seems to remain as originally defined for the duration of the current DOORS session. (Note my use of 'perhaps' and 'seems').

When I've accidentally defined the same function in my library, I generally get a variety of wierd errors including sudden unlocking of modules and DOORS abort. I suspect this is what happens when you evalTop_ a function more than once (even though in my example it seems to run the original one OK). This may explain why folks cannot make evalTop_ work: actually, they cannot make it work more than once per session.

Anyway, I'm not sure how to use all this. I figure to do some testing to find out if memory leak and memory useage are RELEASED at the end of an eval_ call; and if so I could find a way to break up my huge DXL (runs for hours) into memory-manageable chunks. Maybe some of my bigger library functions can have some sort of 'eval_' overloaded partner, evaluating the original and returning the results.
Report this to a Moderator Report this to a Moderator
 4-May-2005 00:12
User is offline View Users Profile Print this message


Bruce Tuskey

Posts: 77
Joined: 2-Mar-2004

Louie,

I have tried using eval_ in memory leak cases. It does not change the biggest cause of memory leaks in DXL (the string table).

We have a tool that will create a custom trace view based on user selected options. In one case it would take ~1hr to run and local memory usage would climb to almost 2GB. Even after the module was closed memory usage would not drop. This is because the string table in DXL is persistent for your entire doors session. The memory will only be released when DOORS is closed. I re-wrote the tool to use Buffers (which can be deleted and allow memory to be reclaimed) every where possible. This reduced memory usage to around 800 MB (OS and other Apps included). When the module was closed, the memory usage dropped to pre run levels + ~ 40MB. Run time was also reduced to ~ 20 min.

I used Buffer's for every concatenation I could. It made the code longer but the results were terrific.

Hope this saves you some time.


-------------------------
Bruce Tuskey
Sr. Principle Engineer
Tuskey@gmail.com

"All that is gold does not glitter, not all those who wander are lost:..." - Gandalf the Grey (JRR Tolkien)

Edited: 4-May-2005 at 00:14 by Bruce Tuskey
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.