com@netinfo.moldova.net wrote:
>
> Hello,
>
> In article <34dcff94.500279443@10.209.30.200>,
> jharris@westpac.com.au wrote:
> >
> > Octav,
> >
> > Once Infomrix allocates a shared memory segment it is not
> > automatically freed when no longer needed.
> >
> > To make online free shared memeory segments do
> > onmode -f> >
>
> Of course I understand this. But my question wasn't about
> shared memory segments. It was about the session memory usage
> inside a (or some) shared memory segments. The count of blocks used
> inside a shared memory segment is shown as --blkused-- by
> onstat -g seg. And this blocks should be freed (in my opinion) as> soon as a session is freeing some resources (cursors, statements).
> So, the question is: why the count of blocks used in a shared memory
> segment doesn't change when I close and FREE the cursor ?
>
The memory used by your cursors and prepared statements (4GL
implicitely prepares statements even if you did not explicitely prepare
any) is freed when the cursor is freed. The communications areas
allocated to support your query were freed when your program exited,
they are kept for reuse until then, but the connection specific
data structures allocated in shared memory are not freed when your
program exits. They are kept for future reuse by another process
to connect with. You should see that if another copy of the process is
executed after the first has exited that the memory used does not
continue to increase but that the allocated structures are reused.
Art S. Kagel