471,092 Members | 940 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

can garbeg collector be assisted by compiler

Garbage collection is done at runtime .Then how compiler can assist it.
Compiler plays no role at runtime . It is stated so on link
"http://www.iecc.com/gclist/GC-faq.html#Common%20questions" .

Regards ,
Mangesh .

Jul 7 '06 #1
2 1324
mangesh wrote:
Garbage collection is done at runtime .Then how compiler can assist it.
Compiler plays no role at runtime . It is stated so on link
"http://www.iecc.com/gclist/GC-faq.html#Common%20questions" .
The full quote reads: "Garbage collection is a part of a language's
runtime system, or an add-on library, perhaps assisted by the compiler,
the hardware, the OS, or any combination of the three, that
automatically determines what memory a program is no longer using, and
recycles it for other use. It is also known as 'automatic storage (or
memory) reclamation'."

Any compiler that helps (e.g., by inserting some extra code here or
there to help in GC) is outside the current C++ Standard on this point,
though "C++0x will most likely support optional garbage collection"
(http://www.artima.com/cppsource/cpp0x.html).

Cheers! --M

Jul 7 '06 #2
In article <11**********************@p79g2000cwp.googlegroups .com>,
ma************@walla.com says...
Garbage collection is done at runtime .Then how compiler can assist it.
Compiler plays no role at runtime . It is stated so on link
"http://www.iecc.com/gclist/GC-faq.html#Common%20questions" .
The compiler itself plays no role at runtime (in the traditional
compiler model) but that's more or less irrelevant. The compiler can
do things like ensuring that (at runtime) the garbage collector can
figure out what's a pointer vs. some other value that might happen to
look like a pointer.

Some concurrent garbage collectors also require reduced access to
data at particular times. They might (for example) allow data to be
read, but not modified while garbage collection is taking place. Such
a write barrier nearly always needs at least some support from the
compiler. Likewise, there are other forms of GC that require a read
barrier at times.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Nick Jacobson | last post: by
3 posts views Thread by Martin Drautzburg | last post: by
5 posts views Thread by Charles T. | last post: by
5 posts views Thread by Ganesh | last post: by
13 posts views Thread by Mingnan G. | last post: by
31 posts views Thread by Mark Dufour | last post: by
4 posts views Thread by karthikbalaguru | last post: by
46 posts views Thread by Carlo Milanesi | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.