Skip to content

Commit 0a096a2

Browse files
committed
design/70257-memory-regions.md: fix some minor errors
Change-Id: I269448ac694280e6642ab3eaebfa3ae402d0ff54 Reviewed-on: https://go-review.googlesource.com/c/proposal/+/626558 Reviewed-by: Michael Knyszek <mknyszek@google.com>
1 parent ccb094a commit 0a096a2

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

design/70257-memory-regions.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ Then, `region.Do` calls the function that was passed to it.
226226

227227
The special allocation path allocates all memory in a special part of the heap.
228228
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).
230231
(Subtlety: "blueness" is relative to the goroutine that allocated the memory.)
231232

232233
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.
339340
The GC will scan blocks using the object start bitmap to find the start of the
340341
object, and thus the object header.
341342
It marks and scans all reachable objects in blocks, even those objects that are
342-
still blue have not escaped.
343+
still blue.
343344
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.
346347

347348
#### Sweeping
348349

349350
There are two ways in which objects in region blocks may have their memory made
350351
available for reuse.
351352
The first is based on the mark bits, which we'll call "full sweeping" since it's
352353
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."
354355

355356
Full sweeping of all blocks is performed each GC cycle.
356357
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
365366
Lines that do not overlap with any faded words, as indicated by the bitmap, are
366367
made available for allocation.
367368
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
369370
object is dead when `f` returns.
370371
The only hazard is if the GC queues a pointer to blue memory that is later
371372
freed.
@@ -946,7 +947,7 @@ Note that such a profile would likely be larger than a typical heap profile,
946947
because one would want to group stacks by the number of GC cycles survived by
947948
the allocations made there.
948949

949-
### Allocating tracing
950+
### Allocation tracing
950951

951952
With a little bit of extra tooling, it would be possible to give very precise
952953
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.
11431144
### Immix
11441145

11451146
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
11491148
Performance](https://www.steveblackburn.org/pubs/papers/immix-pldi-2008.pdf)"
11501149
(Blackburn, 2008), since it offers a mostly non-moving bump-pointer allocator
11511150
design.

0 commit comments

Comments
 (0)