> Does anyone know exactly what the "Deallocate memory as soon as
> possible" option does? We are also trying this as a last resort, but
> we have no clue what it is actually doing. For example, will it dump
> data in uninitialized shift registers? Does it unload VIs from memory
> (when you would normally expect them to remain in memory)? Or is it
> just "tidying things up" more quickly than it normally does?
>
This option means that after each subVI call, even those inside of
loops, LV will deallocate all temporary memory buffers. It has no
effect on unwired shift registers, controls and indicators or on the
results of the subVI. Without this option turned on, LV will leave the
buffers allocated waiting for the subVI to be called
again. So, this is
the typical space versus time tradeoff. This has no effect on which VIs
are loaded or unloaded.
Now that you know what it does, this feature can lead to fragmentation
of the memory manager since it so frequently allocates and deallocates
the blocks of memory. There is nothing wrong with the feature, but most
memory managers can't deal with this and with certain VIs, it can result
in more memory being used than when it is turned off.
Often the "memory problem" is better solved by getting rid of global
variables and local variables and making more subVIs. It is hard to get
more specific, but the user manual used to have a chapter on performance
that explained some of it.
Greg McKaskle