LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Resource Tracking Window

Solved!
Go to solution

I have some questions on the new resource tracking:

 

1) It seems to me that the ressource tracking window always pops up after a program has finished (extended debuging level): even if I close the window, after the next run it is back again? Why is it so obstrusive and why doesn't it behave like all the other windows such as 'variables'. 'threads', etc.? At http://zone.ni.com/devzone/cda/tut/p/id/7959 it says, to view the Resource Tracking window, select Window»Resource Tracking in the active LabWindows/CVI window. Well, for me I do not have to click, it is always there...

 

2) What does it show after the program has finished? There is a list of memory blocks (of different size) that obviously have been allocated by calloc during the program run. Does it mean, this list shows all the unfreed memory? According to the help, black color means existing allocated resources; do I understand it correctly that this memory has not been deallocated correctly in my program - puh... Unfortunately, I can not use 'view memory' as it is greyed out - because the execution has finished or because the memory has been freed?

 

I guess this resource monitor is quite useful - but some more help might be appropriate. Thanks,

Wolfgang

0 Kudos
Message 1 of 3
(3,886 Views)
Solution
Accepted by topic author Wolfgang

Hey Wolfgang,

 

The resource tracking window should only pop up at the completion of your program if there are resources that have not been properly deallocated, showing each individual memory block that was not freed.  While I would never want to insinuate that our code is any less prone to bugs than yours (especially considering your recent knack for finding them in CVI ), I would encourage you to take another look at the memory blocks in the resource tracking window at the completion of your program.  If you find something you think is suspect, I would certainly be happy to take a look at it   🙂

 

Viewing the resource window through the Window menu is especially useful for tracking resources when your application is broken in the debugger.  This is also when the colors come into play - Red means that the memory was just allocated - gray means it was just deallocated, and black is for the time in between. 

 

Finally, you are correct that you can not select 'view memory' because execution has finished - it has nothing to do with the whether or not the memory block has been freed. 

 

NickB

National Instruments 

Message 2 of 3
(3,872 Views)

Hi Nick,

 

thanks for your explanation! Actually this resource tracking was the major reason for me to upgrade my previous CVI7 - I am using lot's of dynamic memory, so I wanted to check the proper deallocation using your tool. And indeed it is a good idea that this window pops up to remind the user that some code needs improvement... But may be such an interesting detail could be added to the docs, too?

 

Thanks again,

 

Wolfgang

0 Kudos
Message 3 of 3
(3,861 Views)