Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Show Buffer Allocations Window

LabVIEW 2012 Help

Edition Date: June 2012

Part Number: 371361J-01

»View Product Info
Download Help (Windows Only)

Requires: Base Package

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(s) 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 largest data type. When you run a VI, LabVIEW might or might not use those 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.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit