04-12-2013 10:40 AM
Hi guys.
I have a question on the Reentrant shared clones between instances.
I understand the concept of Reentrant shared clones between instances, Next clone get into the memory after a clone get out the memory.
My question is that how many instances of clone can run simultaneously? How much memory is allocate for Reentrant shared clones between instances?
If I use call Vi by reference as show in the the figure, will it open more than one VI and keep it in the memory.
04-12-2013 12:00 PM - edited 04-12-2013 12:06 PM
You might be just a bit confussed about clones, clone pools, and that option 0x80 setting.
Your code as written will cause an error to subsequent calls unless the vi has finished first.
Combining the 0x80 flag with ox40 prepares the vi to be called reenterant so each call to the modified vi will casue one dataspace to be checked out of the clone pool. The default is one dataspace per core in the clone pool, that can be increased (but not decreased) with the populate async call pool method.
Each time that sub vi runs another dataspace is checked out of the clone pool. If none are avalable additional dataspaces are created on the fly. this takes time you will notice.
The sub-vi is responsible for returning the dataspace to the clone pool when it finishes.
As far as how many can be in memory at one time. how much memory can your application access and how much memory does your vi's dataspace take?
04-13-2013 04:20 AM
Thanks a lot
10-28-2013 01:52 PM
The default is one dataspace per core in the clone pool, that can be increased (but not decreased) with the populate async call pool method.
Jeff,
I'm looking into a memory management issue in my application in which I asynchronously call a reentrant (preallocated option) VI that generates/handles a decent amount of memory. When this VI stopped however, I do not see my memory usage decrease back down to the memory level prior to the VI running. Your comment of 'but not decreased' caught my attention. If I am only setting the 0x80 flag when I call my VI, is what I am experiencing with memory expected?
10-29-2013 10:36 AM
Quintin
That sounds susspiciously like you have set the 0x100 flag not the 0x80 and 0x40 flags
10-29-2013 11:14 AM
I double checked and I am OR'ing flags 0x80 and 0x40. Would the fact that the VI I am launching accepts a LV class as one of its inputs and calls method and property VIs of this class when it executes?
10-29-2013 11:31 AM
To expand a little further on my last post based on some further investigating I've been doing: my class contains a few queue references that are created outside of, and prior to my clone VI launching. Could this be causing an issue if the queue references exist outside of my clone VI? I do however, destroy the queue refs outside of the clone VI once the clone VI finishes its execution.
(Sorry for the double post)
10-29-2013 11:42 AM
I could help a bit better if you posted some code at least a sippette of the code setting up the ACBR