Questions tagged [garbage-collection]
The garbage-collection tag has no usage guidance.
20
questions
0
votes
0answers
36 views
Concurrent Garbage-Collectiong/Compacting Memory Allocator
I'm developing an algorithm for concurrent heap garbage collection/compaction. It will be used in low latency systems that need to scale well to a lot of clients, e.g. web servers.
I thought about an ...
2
votes
1answer
21 views
delete node from linked list (lang w/GC) -should deleted item 'next' be set to null
Regarding: delete a node from a linked list algorithm,in procedural languages with garbage-collection.
Should there be a step in the algorithm, of setting the removed-node-next-pointer to null ?
(...
2
votes
0answers
17 views
Region-based memory management for recursive type
In the chapter 4 of Pierce's TAPL which discusses the implementation of untyped arithmetic expressions, the author said
The most important [for the implementation requirements] are automatic ...
0
votes
0answers
21 views
Distribution of number of references to other object in an object
I been thinking about an improvement to a garbage collector (details not important for this question) and wished to know how often does a object have no reference to other objects. Clearly this will ...
2
votes
0answers
25 views
Sweeping integrated into memory allocation: Why only fixed size objects?
In our language design book, it is mentioned that GC sweep can be integrated into allocation, such that when you call malloc for example, you sweep until you find a ...
2
votes
2answers
541 views
Is it possible to implement a WeakMap with primitive keys and weak values?
Theory
Basically, I have a use-case where I would like to use primitives to store weak references to non-primitive values. If the value is no longer referenced anywhere else, then the entry should be ...
8
votes
2answers
216 views
What would a language look like in which precise GC was implementable as a library?
Suppose you have some programming language with manual memory management. What features does this language need to have in order to be able to implement precise garbage collection as a library, and ...
63
votes
12answers
12k views
Why don't compilers automatically insert deallocations?
In languages like C, the programmer is expected to insert calls to free. Why doesn't the compiler do this automatically? Humans do it in a reasonable amount of time(ignoring bugs), so it is not ...
5
votes
1answer
156 views
What are some possible “functional” memory structures?
With my thin knowledge on embedded systems, compilers, and computer architectures, I know that the basics of computer memory(physical) are sort of like an array, with addressing which work like ...
12
votes
6answers
1k views
Why does garbage collection extend only to memory and not other resource types?
It seems like people got tired of manual memory management, so they invented garbage collection, and life was reasonably good. But what about every other resource types? File descriptors, sockets, ...
9
votes
3answers
402 views
Is reference counting GC vs. tracing GC a language property or an implementation property?
We sometimes hear "Swift doesn't do classic (tracing) GC, it uses ARC."
But I'm not sure if there is anything in the Swift semantics that requires reference counting. It seems that one could build ...
4
votes
1answer
90 views
How did MacLisp's garbage collector “run in the register set”?
Olin Shivers, āHistory of Tā:
Maclisp on the [PDP]-10 had used a mark&sweep GC (one version of which famously "ran in the register set," though that is another story)
This implies, in my ...
2
votes
0answers
78 views
How does the Spark M7 āConcurrent Fine-grain Memory Migrationā benefit a garbage collector?
Sun has been making a lot of noise about the Spark M7 and its inbuilt support for the java garbage collector. However there seem to be very little easy to find information about it. Please can ...
23
votes
4answers
4k views
How do garbage collectors avoid stack overflow?
So I was thinking about how garbage collectors work and I thought of an interesting issue. Presumably garbage collectors have to traverse all structures in the same way. They can't know weather they ...
3
votes
1answer
108 views
When was the terminology *tracing collector* introduced to denote both mark-and-sweep and copy collectors
Automatic storage reclamation, aka garbage collection, comes in two
main families, sometimes cooperating: the reference count collectors
and the tracing collectors. I may develop specifics of each ...
28
votes
7answers
4k views
Why is the object destructor paradigm in garbage collected languages pervasively absent?
Looking for insight into decisions around garbage collected language design. Perhaps a language expert could enlighten me? I come from a C++ background, so this area is baffling to me.
It seems ...
5
votes
1answer
220 views
Recent Garbage collection survey paper
Many years ago I read a GC survey paper that was updated every few years with advances; I tried to find such a paper today to point a questioner on Stackoverflow at.
However all I can find is very ...
7
votes
1answer
255 views
Tag-free garbage collection for object oriented languages
I'm looking around for a good garbage collection technique for my language and found this paper, where Benjamin Goldberg describes a garbage collection technique for strongly typed languages, which ...
12
votes
2answers
516 views
Are there any garbage collectors that take into account paging?
Garbage collections have to visit all objects that are alive, so as to find the memory that can be reclaimed. (Having many generationsā just delays this a bit)
All things being equal, it is ...
38
votes
2answers
2k views
Are generational garbage collectors inherently cache-friendly?
A typical generational garbage collector keeps recently allocated data in a separate memory region. In typical programs, a lot of data is short-lived, so collecting young garbage (a minor GC cycle) ...