in the SimpleQueueExample there is the following NOTEs. aElements : ARRAY[0..9] OF COL.IElement; // Create an array of IElements for a static queue. NOTE: The size must be 2 times larger than the maximum number of used elements.
queue : COL.Queue := (paElements := ADR(aElements), udiMaxElements := 10); // Created a static queue. NOTE: Static created elements of this queue will be online change safe.
What does The size must be 2 times larger than the maximum number of used elements. exactly mean?
Is it true?
Thanks for the help in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
in the SimpleQueueExample there is the following NOTEs.
aElements : ARRAY[0..9] OF COL.IElement; // Create an array of IElements for a static queue. NOTE: The size must be 2 times larger than the maximum number of used elements.
queue : COL.Queue := (paElements := ADR(aElements), udiMaxElements := 10); // Created a static queue. NOTE: Static created elements of this queue will be online change safe.
What does
The size must be 2 times larger than the maximum number of used elements.
exactly mean?Is it true?
Thanks for the help in advance.
Same question here...
From my tests it seems also that if I try to fill the queue it gives the "Max size exceeded" error with the exact size of the array.
So it seems that there is no need to have an underlying array 2 times the max size, but I'm concerned with possible memory overflows...