473,394 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 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 1436
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Nick Jacobson | last post by:
In the Python documentation on Extending and Embedding (in section 1.10), there's a quote: "Maybe some day a sufficiently portable automatic garbage collector will be available for C. Until...
3
by: Martin Drautzburg | last post by:
Just for curiosity: does python use a mark-and-sweep garbage collector or simple reference counting? In the latter case it would not garbage collect circular references, right ? For...
10
by: pachanga | last post by:
The Hans-Boehm garbage collector can be successfully used with C and C++, but not yet a standard for C++.. Is there talks about Garbage Collector to become in the C++ standard?
5
by: Charles T. | last post by:
Hi, looking for advance article/books on garbage-collected allocation. thanks, Charles.
5
by: Ganesh | last post by:
Hi, How does a garbage collector (in C++), like mark and sweep, work on heap allocated arrays? In this case, 1. The only live variable on stack that points to the memory may be the one that...
13
by: Mingnan G. | last post by:
Hello everyone. I have written a garbage collector for standard C++ application. It has following main features. 1) Deterministic Finalization Providing deterministic finalization, the system...
31
by: Mark Dufour | last post by:
Hi all, I have recently released version 0.0.20 and 0.0.21 of Shed Skin, an optimizing Python-to-C++ compiler. Shed Skin allows for translation of pure (unmodified), implicitly statically typed...
4
by: karthikbalaguru | last post by:
Hi, Is there a possibility to fool the C compiler into believing that two data types are different by renaming one of them. I tried using typedef. But it did not work out. :(:( . C compiler was...
46
by: Carlo Milanesi | last post by:
Hello, traditionally, in C++, dynamically allocated memory has been managed explicitly by calling "delete" in the application code. Now, in addition to the standard library strings, containers,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.