Memory efficiency usage

Topics that can not be classified under other subforums
Ответить
pescecannuccia
beginner
beginner
Сообщения: 24
Зарегистрирован: 28 янв 2013, 14:47
Версия LabVIEW: 2012

Memory efficiency usage

Сообщение pescecannuccia »

Hello to everyone,
I want to ask the following question: from the point of view of the memory usage is it better to use, in a big VI, subVIs (also in order to make very simple operations like an arithmetic average among the elements of an 1D array)?
Аватара пользователя
IvanLis

Activity Professionalism Tutorials Gold Man of the year 2012
Автор
guru
guru
Сообщения: 5099
Зарегистрирован: 02 дек 2009, 17:44
Награды: 7
Версия LabVIEW: 2015, 2016
Откуда: СССР
Благодарил (а): 14 раз
Поблагодарили: 26 раз

Re: Memory efficiency usage

Сообщение IvanLis »

pescecannuccia писал(а):Hello to everyone,
I want to ask the following question: from the point of view of the memory usage is it better to use, in a big VI, subVIs (also in order to make very simple operations like an arithmetic average among the elements of an 1D array)?
How Can I Optimize the Memory Use in My LabVIEW VI

To calculate the average use Mean VI
pescecannuccia
beginner
beginner
Сообщения: 24
Зарегистрирован: 28 янв 2013, 14:47
Версия LabVIEW: 2012

Re: Memory efficiency usage

Сообщение pescecannuccia »

Thanks for the suggest!
jg69

Professionalism
developer
developer
Сообщения: 265
Зарегистрирован: 14 окт 2008, 00:09
Награды: 1
Версия LabVIEW: 8.x, 20x

Re: Memory efficiency usage

Сообщение jg69 »

Usually, LabVIEW makes copies of data. The buffer allocation tool in general marks inputs and outputs of SubVIs as copies.

But to my expierence this is not always true.

If you manipulate an array in a SubVI in such a way that LabVIEW can reuse the memory - that includes using an array as input and also output of the SubVI - than LabVIEW will not copy the data (i.e. it behaves like call by reference - reusing the memory).
Ответить

Вернуться в «General»