07-12-2012 11:09 AM - edited 07-12-2012 11:10 AM
Hi all,
I've a small issue using the "Resample waveforms" function. I have a 1 minute tone sampled at 44.1 kHz. I need to resample it at 48 kHz. When I run the attached example here are the LabVIEW.exe memory use as seen in Windows Task Manager :
- Before "Sine Waveform.vi" = 149'580 KB
- Before "Resample Waveforms" = 232'440 KB
- After "Resample Waveforms" = 505'056 KB
First question : Why does memory use increase by around 80 MB when I create a 1 minute waveform ? The waveform length is 60 seconds and sampling rate is 44100 Hz => 2646 KSamples. The waveform datatype is DBL (64 bits) => 2646 KSamples * 64 bits => 20.19 MB. What is wrong ?
Furthermore, the resampling function works but seems to not release memory after processing the waveform. Is there any way to force memory deallocation of a single function ?
Thanks and best regards,
Alex
07-12-2012 11:27 AM - edited 07-12-2012 11:28 AM
Hi Alex,
using LV2011SP1 task manager gives following numbers:
before "sine": 107MB
after "sine": 128MB (waveform needs ~20MB)
after "resample": 346MB
So resampling tooks it's memory - and will free it only, when the VI gets removed from memory. Additionally you need memory for the waveform indicator, which now holds 2880000 samples!
Subsequent runs of the VI only increase the memory usage before "sine", after "sine" still takes additional 20MB, after "resample" stops with 346MB...
07-13-2012 04:11 AM
Hi GerdW,
Thanks for you reply.
My first run was done with LV2009SP1. I tried again with LV2011 and now I get the same as you. After "sine", I get a memory use increase of around 20 MB (doing the same on LV2009 results in 80 MB). So there is something which I can't explain with LV2009.
Best regards,
Alex