09-07-2006 02:44 AM
Hi,
I have some questions StationGlobal’s oriented:
1. Does the variables of type StationGlobal allocate equals amount of memory without reference to type?
For example: Number/String/Boolean/Object Reference allocates equals resources:Number=String=Boolean=Object Reference=’X’ bytes)
Or Number=’X’ bytes, String=’Y’ bytes, Boolean=’Z’ bytes?
2. Does it make the difference if I have 10 or 100 or 1000 StationGlobals variables allocated in my system regards - resources of my system and
how the quantity of it influences(or not influences) to performance of system/Test execution?
Those questions are important, because we want to know how the quantity/type of StationGlobal’s lvariables influence to overall throughput/performance of
System (e.g. Test running).
09-07-2006 09:49 AM
The amount of memory used depends on the number and type of variables just like you would expect. For example an array of 1000 numbers takes more memory than a single number, or a string holding a long value takes more memory than a string holding a short one.
However, unless you have absolutely enormous arrays of complex data structures, you are very unlikely to see any measurable performance difference.
Also, if you happen to build a system that uses more than the available amount of RAM such that it frequently swaps to disk, you can just add more RAM. The Windows task manager is an easy way to see if you are using more the amount of physical memory on your machine.
09-10-2006 12:50 AM
Thanks,
Where i can find exact information about how many memory resources every from different types uses ?
09-11-2006 09:51 AM
09-12-2006 12:36 AM
Strange thing...
So if I understood you corectly, the right/single way to check the influence of my allocated variables is to check the amount of memory from
windows task manager???
09-12-2006 10:30 AM
Not so strange IMHO. You might be making a mental analogy to C data structures where nothing is abstracted and you know exactly what is happening to each byte.
However, TestStand variables are black box objects with a lot more functionality than plain C data structures. Like most such objects you create via almost any object oriented API, their exact memory usage is NOT documented.
One reason memory usage is not documented is that we need to be free to change the implementation if necessary, which would not be possible if we make guarantees about exact memory usage. Another reason it is not documented is because in most practical cases, it is not important, and we don't want to mislead people into worrying about it.
If you are allocating data structures of such vastness that it actually does matter, then the task manager is an appropriate and easy tool to use to view the approximate magnitude of memory used by the objects you create. This applies to most objects from most APIs, not just TestStand variables.
09-13-2006 03:35 AM
09-13-2006 09:44 AM
1. Hmm. I don't understand. If you are asking if my response is an official response from NI, then I'd say that while no one has approved my response, I do work at NI on the TestStand product.
2. No, there is no such tool. I have not heard many (any?) other requests for one. There is a feature in TestStand 3.5, Configure>>Station Options>>Preferences>>Debug Options>>Report Object Leaks, that will tell you which TestStand objects (if any) that you have allocated but failed to release at the time the engine shuts down.
09-14-2006 01:22 AM