LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reentrant shared clones between instances Memory Usage

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. 

Dynamically Calling VI.gif

0 Kudos
Message 1 of 8
(3,687 Views)

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?


"Should be" isn't "Is" -Jay
Message 2 of 8
(3,673 Views)

Thanks a lot

0 Kudos
Message 3 of 8
(3,645 Views)

 

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?

 

0 Kudos
Message 4 of 8
(3,543 Views)

Quintin

That sounds susspiciously like you have set the 0x100 flag not the 0x80 and 0x40 flags


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 8
(3,517 Views)

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?

0 Kudos
Message 6 of 8
(3,509 Views)

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)

0 Kudos
Message 7 of 8
(3,505 Views)

I could help a bit better if you posted some code at least a sippette of the code setting up the ACBR


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 8
(3,498 Views)