Since Labview suffers from "Not enough memory to complete operation" if one is not carefull I though its time to propose an idea to solution.
Problems:
1. when initializing new array user does not now if the function succeded or not until is too late (window with Not enough memory pops up).
2. If out of memory happens in a loop then user is left with no choice but to kill the aplication (there is no STOP button on the out of memory message!).
3. If user clicks OK memory gets released but the function (say Initialize array) still throws Not enough memory if its called in a loop.
Proposed solution
1. Provide an error terminal on all blocks that operate on memory (initialize array, Insert into array, build array...). this terminal would indicate if the function succeded or not (without pop up message!)
2. Get rid of pop-up "Not enough memory to complete operation" window. Instead the out of memory should be thrown on error terminal where it happend (initialize array, insert into array, etc....).
3.If the "not enough memory..." window must pop up by some strange reasoning, then at leas provide a STOP button.
Key Benefits:
1. Easier and cleaner code. Say that I want a 2D m by n U32 array sizeof(max_free_mem). In proposed solution I could do that in a loop. If I get an error at alocation I could reduce the size untill I get alocated largest free memory block size m-x by n-y and store that block in a "data value reference". Then I would repeat the process to alocate smaller and smaller blocks until I get to the desired size. I would end up with an array of clusters of 1D data value reference arrays.
2. No calls to external dll to get memory information would result in less overhead.
3. Posibility to alocate all free memory (the goal)
4. No more annoying pop up window
..and more
I really wish to see this in next release if not sooner as a patch 😉
regards
Dejan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has not received any kudos within a year after posting will be automatically declined.