03-27-2008 01:40 PM
03-27-2008 02:07 PM
03-27-2008 02:19 PM
03-27-2008 02:31 PM
03-27-2008 03:02 PM
I've become way too familiar with the subtlties of callbacks in LabVIEW with this project.
The callbacks are occuring from 1 to 10 times/second. There's 10 or so callback functions registered. The callback functions reside in an App-builder-generated DLL structured to match the C prototype of the caller's expectations. In some of these callback functions, there's a pointer passed to the callback. This pointer is used, along with length information, with the LV Runtime Engine function "MoveBlock" to copy the data at the pointer to LabVIEW-controlled memory space. The function is then closed, and the data is used from the copied location (now just a 'wire').
In the above, the pointer and known length are used to copy an array from the callback to a 'wire'. This array is flattened, tagged with the event type that generated the array, and flattened again to include in a LabVIEW User Event. The LVRT MoveBlock is marked as re-entrant (as is the callback DLL).
I'm guessing there's many ways this process could mess with Windows memory management...I just don't see how it could be made better to prevent the perpetual increase in Page Faults. Even though the PF's are not bad unto themselves, The quantity of PF's generated every second may be an indication of a bigger problem?
03-27-2008 03:12 PM
03-27-2008 03:15 PM
03-27-2008 03:38 PM
I ran into this problem a while back. I solved it by placing case boxes around different program functions and turn them on/off while running to pin point the source. The main cause of my PFs where coming from a shared variable library deployment call that constantly tried to deploy w/o closing the reference. Actually I only needed to do this once at bootup or if not found.
But anyway, try the multiple case debugging technique and look for things like file opens that do not close. Also you may have a huge number of abandon temporary files that need purged once you find the problem.
Good luck
RAM
03-28-2008 09:38 AM
03-28-2008 11:05 AM