Create BAKER_SCRIPT.md

Former-commit-id: 39c7bd2d0b83832f7309ef829bc44b421cc6da59
This commit is contained in:
David Himmelstrup 2019-07-15 14:51:49 +08:00 committed by GitHub
commit 31b1ba785e

8
BAKER_SCRIPT.md Normal file
View file

@ -0,0 +1,8 @@
# Baker's Algorithm
A computer's memory is finite and will quickly run out if it is not reused. Manually marking objects for reuse is error prone
and automatic memory management techniques have become the default in high level languages.
Copying garbage collector divide available memory into two segments and marks one of them for new allocations.
No memory is reused until the segment is full. When this happens, reachable objects are copied to the opposite segment. Anything
left must be unreachable and the memory in the segment can be reused.