Show Buffer Allocations Window

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2015 Help
LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help

Requires: Base Development System

Select Tools»Profile»Show Buffer Allocations to display this window.

Use this window to identify specific areas on the block diagram where LabVIEW allocates memory space in the form of a buffer.

Place a checkmark next to the data type you want to see buffers for and click the Refresh button. The black squares that appear on the block diagram indicate where LabVIEW creates buffers to allocate space for data.

The amount of memory LabVIEW allocates for each buffer is the same size as the top-level data size of the object for which LabVIEW allocates the buffer. For a 32-bit integer, the top-level data size is 4 bytes. For an array, the top-level data size is the size of a single pointer, which is 4 bytes on 32-bit platforms and 8 bytes on 64-bit platforms, regardless of the type of array. For clusters, the top-level data size is equal to the sum of the top-level data sizes for all the elements inside the cluster. When you run a VI, LabVIEW might or might not use the allocated buffers to store data. You cannot know whether LabVIEW makes a copy of the data because LabVIEW makes that decision at run time or the VI might depend on dynamic data.

If the VI needs memory for a buffer allocation, LabVIEW makes a data copy for the buffer. If LabVIEW is not sure whether the buffer needs a data copy, LabVIEW sometimes still makes a copy for the buffer.

If your VI is broken, no black squares appear.

Once you know where LabVIEW creates buffers, you might be able to optimize the performance of the VI by editing it to reduce the amount of memory LabVIEW requires to run the VI.

This window includes the following components:

  • Arrays—Displays buffers for arrays on the block diagram. If you want to reduce the amount of memory LabVIEW requires to run the VI, avoid displaying large arrays on open front panels if possible. Indicators on open front panels retain a copy of the data they display. Also, avoid overusing global and local variables when working with arrays. Reading a global or local variable causes LabVIEW to generate a copy of the data.
  • Clusters—Displays buffers for clusters on the block diagram. If you want to reduce the amount of memory LabVIEW requires to run the VI, avoid using hierarchical data structures, such as clusters or arrays of clusters that contain large arrays or strings because LabVIEW cannot manipulate these structures efficiently and might cause a VI to use more memory.
  • Strings—Displays buffers for strings on the block diagram. If you want to reduce the amount of memory required to run the VI, avoid displaying large strings on open front panels when possible. Indicators on open front panels retain a copy of the data they display. Also, avoid overusing global and local variables when working with large strings. Reading a global or local variable causes LabVIEW to generate a copy of the data.
  • Paths—Displays buffers for paths on the block diagram.
  • Scalars—Displays buffers for scalar values on the block diagram.
  • Variants—Displays buffers for variant values on the block diagram.
  • All other types—Displays buffers for all data types not listed above.
  • Dynamic dispatch temporaries—Configures the dynamic dispatch subVIs to display temporary buffer allocations. This occurs when the original ancestor implementation VI does not modify the input value, but the descendant implementation VI invoked at run-time does modify the input value. The temporary buffer allocations do not indicate a copy occurs, only that a copy might occur.
  • Refresh—Displays black squares on the block diagram to show the buffers for the data type(s) you select. If you make a change to a VI that requires LabVIEW to recompile the VI, the black squares disappear because the buffer information might no longer be correct. Click the Refresh button to recompile the VI and display the black squares.

WAS THIS ARTICLE HELPFUL?

Not Helpful