Skip to content

Commit 5eacf66

Browse files
committed
Make a note about "gigabyte"
Fixes #28461
1 parent a216e84 commit 5eacf66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/doc/trpl/the-stack-and-the-heap.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ visualize what’s going on with memory. Your operating system presents a view o
7474
memory to your program that’s pretty simple: a huge list of addresses, from 0
7575
to a large number, representing how much RAM your computer has. For example, if
7676
you have a gigabyte of RAM, your addresses go from `0` to `1,073,741,823`. That
77-
number comes from 2<sup>30</sup>, the number of bytes in a gigabyte.
77+
number comes from 2<sup>30</sup>, the number of bytes in a gigabyte. [^gigabyte]
78+
79+
[^gigabyte]: ‘Gigabyte’ can mean two things: 10^9, or 2^30. The SI standard resolved this by stating that ‘gigabyte’ is 10^9, and ‘gibibyte’ is 2^30. However, very few people use this terminology, and rely on context to differentiate. We follow in that tradition here.
7880

7981
This memory is kind of like a giant array: addresses start at zero and go
8082
up to the final number. So here’s a diagram of our first stack frame:

0 commit comments

Comments
 (0)