@@ -226,7 +226,8 @@ Then, `region.Do` calls the function that was passed to it.
226
226
227
227
The special allocation path allocates all memory in a special part of the heap.
228
228
Memory allocated this way is referred to as "** blue** " (** Bounded-Lifetime
229
- Unshared** memory, ** Eagerly** reclaimed, for lovers of tortured acronyms).
229
+ Unshared** memory, ** Eagerly** reclaimed, for fellow lovers of tortured
230
+ acronyms).
230
231
(Subtlety: "blueness" is relative to the goroutine that allocated the memory.)
231
232
232
233
In the ` g ` , we keep track of every span that was created as part of the blue
@@ -339,18 +340,18 @@ When an object is marked, the (N+1 mod 2)'th bit is simultaneously cleared.
339
340
The GC will scan blocks using the object start bitmap to find the start of the
340
341
object, and thus the object header.
341
342
It marks and scans all reachable objects in blocks, even those objects that are
342
- still blue have not escaped .
343
+ still blue.
343
344
It also marks any lines containing marked objects.
344
- When the GC marks an object whose escape bits are not set, it leaves the escape
345
- bits alone.
345
+ When the GC marks an object whose fade bits are not set, it leaves the fade bits
346
+ alone.
346
347
347
348
#### Sweeping
348
349
349
350
There are two ways in which objects in region blocks may have their memory made
350
351
available for reuse.
351
352
The first is based on the mark bits, which we'll call "full sweeping" since it's
352
353
very close in semantics to the existing sweeper.
353
- The second is based on the escape bits, which we'll call "eager sweeping."
354
+ The second is based on the fade bits, which we'll call "eager sweeping."
354
355
355
356
Full sweeping of all blocks is performed each GC cycle.
356
357
Lines that have not been marked are made available for allocation by installing
@@ -365,7 +366,7 @@ Eager sweeping of region blocks is performed when the function passed to
365
366
Lines that do not overlap with any faded words, as indicated by the bitmap, are
366
367
made available for allocation.
367
368
Note that we may free blue objects that were marked.
368
- This is mostly fine: if the object never escaped , we can be certain that the
369
+ This is mostly fine: if the object never faded , we can be certain that the
369
370
object is dead when ` f ` returns.
370
371
The only hazard is if the GC queues a pointer to blue memory that is later
371
372
freed.
@@ -946,7 +947,7 @@ Note that such a profile would likely be larger than a typical heap profile,
946
947
because one would want to group stacks by the number of GC cycles survived by
947
948
the allocations made there.
948
949
949
- ### Allocating tracing
950
+ ### Allocation tracing
950
951
951
952
With a little bit of extra tooling, it would be possible to give very precise
952
953
suggestions on where memory regions might be applicable (that is, where memory
@@ -1143,9 +1144,7 @@ Overall, it's just not quite the right fit.
1143
1144
### Immix
1144
1145
1145
1146
This design borrows heavily from "[ Immix: A Mark-Region Garbage Collector
1146
- with] ( https://www.steveblackburn.org/pubs/papers/immix-pldi-2008.pdf )
1147
-
1148
- [ Space Efficiency, Fast Collection, and Mutator
1147
+ with Space Efficiency, Fast Collection, and Mutator
1149
1148
Performance] ( https://www.steveblackburn.org/pubs/papers/immix-pldi-2008.pdf ) "
1150
1149
(Blackburn, 2008), since it offers a mostly non-moving bump-pointer allocator
1151
1150
design.
0 commit comments