www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Is heap scanning done conservatively?

reply Larry Evans <cppljevans cos-internet.com> writes:
I've actually got 2 questions, which are actually on:

   http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Memory

under topics:

   root pointer scanning?

   Confused by docs for class instance on stack

I'm assuming that the scanning is done conservatively, but then
I'm wondering why the compiler doesn't provide the information
(location of pointers/references within each object) needed
for precise scanning?
Oct 21 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"Larry Evans" <cppljevans cos-internet.com> wrote in message
news:djanin$1rdd$1 digitaldaemon.com...
 I've actually got 2 questions, which are actually on:

    http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Memory

 under topics:

    root pointer scanning?

    Confused by docs for class instance on stack

 I'm assuming that the scanning is done conservatively,

Yes.
 but then
 I'm wondering why the compiler doesn't provide the information
 (location of pointers/references within each object) needed
 for precise scanning?

To do so would improve the garbage collection, and so such will probably get done in the future.
Oct 21 2005