> There is an issue with Labview causing memory fragmentation when calling
> external DLL's, which AFAIK all the NI-DAQ vi's do. I have seen error
> 10403 when attempting to perform a buffered DAQ operation on a device
> that does not support buffered IO.
>
> If you are performing repetative DAQ operations and are creating and
> destroying the data buffer on each iteration (using the AI Config and AI
> clear vi's) your system's memory may eventually become too fragmented for
> NI-DAQ to allocate enough memory for the data buffer.
>
> If you can provide a little more information about your code (what kind
> of daq operations is it performing, etc.), I may be able to provide more
> help.
>
I'm not aware of the fragmentation
issue with general DLLs. If it is
necessary for LV to convert data at the boundary of the DLL, then that
may cause some fragmentation, all memory management does, but that will
show up in the task manager and in the LV help window as LV using more
memory.
As for the DAQ VIs, they are currently calling CINs instead of DLLs.
Theres not much difference, but the CINs always use LV compatible
datatypes and while the buffers may need to be resized based on the
amount of data passing to the and from the CIN, there aren't any
temporary allocations because everything is a compatible type.
With a DAQ config, the buffer there is a special type of allocation
that the driver makes so that the memory pages are locked into memory
because they must be there at interrupt time. Redoing DAQ config
within a loop may have some special concerns about fragmentation, but
I'm not aware of any. Something like this should be in the Knowledge-
base if it is the case.
Greg McKaskle