General Problems for GC'ed Applications?
Karen Lanrap
karen at digitaldaemon.com
Fri Jul 28 23:40:24 PDT 2006
Walter Bright wrote:
> The GC scans the static data, the registers, and the stack for
> pointers. Any pointers in that to GC allocated data is called
> the 'root set'. Any GC allocated data that is pointed to by the
> 'root set' is also scanned for pointers to GC allocated data,
> recursively, until there are no more memory blocks to scan.
I believed that the GC is working somehow that way. Therefore I
raised the question as a "general problem". I repeat your words:
> until there are no more memory blocks to scan.
And this scanning seems to prevent the OS to "page out" the data hold
in the first <mem> - <vital> locations in my code---I finally
understand that he who told me, that there is no difference bewteen
"swapping" and "paging", was wrong.
> why not pick up the book
No, thanks. I am not interested in theoretical foundations.
I observed a nasty behaviour of the code I wrote for the contest
mentioned in <e9p2qg$18j8$1 at digitaldaemon.com>: heavily paging.
After detecting and eliminating the memory leak, which lowered the
"high water mark" from 2.2GB to 1.8GB (my machine holds 2GB of main
memory), that paging was gone.
I was puzzled why this could happen although a GC is used.
Thanks for all the patience.
More information about the Digitalmars-d
mailing list