07-20-2011 09:38 AM
Hello,
I am stucking with a memory usage problem since weeks by TestStand, and now I have an alternative question, which maybe brings me forward.
SequenceFile1 has code modules A, B, F. In addidion, there is a call in this file to another sequence file SequenceFile2.
SequenceFile2 has code modules A, B, C, D, E, F.
The step, which calls the MainSequence in SequenceFile2, has LoadOption_DynamicLoad, and UnloadOption_AfterStepExecution. I have built in a message box at the SequenceFileLoad and SequenceFileUnload callbacks for SequenceFile2, and the message boxes pop up as I expected: by calling MainSequence in SequenceFile2 pops up the "Load" message, and when the MainSequence is done, then the "Unload" message.This seems to work.
In SequenceFile2 all the steps have load option: LoadOption_PreloadWhenExecuted, and UnloadOption_WithSequenceFile. The question is, which code modules will be unloaded after finishing the MainSequence in SequenceFile2? Because the code modules A, B and F are still in use by the caller SequenceFile1. SequenceFile1 works well, so those code modules seem to be still in the memory. So what is exactly unloaded? All code modules, which are not used anymore by SequenceFile1, C and D?
TS2010, no model, no reporting.
07-21-2011 04:24 AM
Hi,
-The Teststand Engine Calls the Callback SequenceFileLoad when the engine loads the sequence file into memory.
-The Teststand Engine Calls the Callback SequenceFileUnload when the engine unloads the sequence file from memory.
Did you try it with the following default settings?
Load Option:
Preload when execution begins --> Loads the code module when any sequence in the sequence file that contains the step begins executing.
Unload Option
Unload when sequence file is unloaded --> Unload the code module when TestStand unloads the sequence file that contains the step from memory.
If you enable the Optimize Non-Reentrant Calls to This Sequence option on the General tab of the Sequence Properties dialog box. Edit>> Sequence Properties..
TestStand does not unload the code modules for the sequence until after the execution ends, regardless of the Unload Option setting for the sequence file or the steps in the sequence.
When you enable this option and if the same sequence is called at the same time in different threads or recursively within the same thread, TestStand creates unique copies of the custom step properties.