godfather Posted January 20, 2004 Report Share Posted January 20, 2004 How can i determine the size of a cluster (it contains arrays and strings) in bytes? Quote Link to comment
Jim Kring Posted January 20, 2004 Report Share Posted January 20, 2004 Use the Flatten to String function. Then get the length of the flattened string. Quote Link to comment
Norm Kirchner Posted January 20, 2004 Report Share Posted January 20, 2004 I'm not sure that this will get you what you really need. Use the Flatten to String function. LV stores scalar data directly in the cluster, but cluster elements such as arrays, strings, and paths are stored indirectly by handles. The cluster contains a handle that points to the memory area in which LV actually has stored the data element. A better trick is to make a new VI that has only the cluster item in it. Press Ctrl+I to bring up the properties of the VI and look at the memory usage. It will give you what the cluster itself uses, but neglects the amount of data in the arrays and strings. :thumbup: Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.