aboutsummaryrefslogtreecommitdiff
path: root/spec/dos-spec.md
diff options
context:
space:
mode:
Diffstat (limited to 'spec/dos-spec.md')
-rw-r--r--spec/dos-spec.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/dos-spec.md b/spec/dos-spec.md
index d0b8e89..d37649f 100644
--- a/spec/dos-spec.md
+++ b/spec/dos-spec.md
@@ -3,7 +3,7 @@
This document is incomplete; it describes some mechanisms that Tor
uses to avoid different kinds of denial-of-service attacks.
-## Handling low-memory conditions
+## Handling low-memory conditions { #oom }
(See also `tor-spec.txt`, section 8.1.)
@@ -22,7 +22,7 @@ With this in mind, any Tor implementation—especially one that
runs as a relay or onion service—must take steps to prevent
memory-based denial-of-service attacks.
-### Detecting low memory
+### Detecting low memory { #oom-detection }
The easiest way to notice you're out of memory would, in theory, be
getting an error when you try to allocate more. Unfortunately, some
@@ -52,7 +52,7 @@ kinds of allocation:
Note that directory caches aren't counted, since those are stored on
disk and accessed via mmap.
-### Responding to low memory
+### Responding to low memory { #oom-response }
If our allocations exceed MaxMemInQueues, then we take the following
steps to reduce our memory allocation.
@@ -87,7 +87,7 @@ rule, according to the age of their oldest queued data.
Upon freeing a circuit, a "DESTROY cell" must be sent in both
directions.
-### Reporting low memory
+### Reporting low memory { #oom-reporting }
We define a "low threshold" equal to 3/4 of MaxMemInQueues. Every
time our memory usage is above the low threshold, we record