Skip to content

Commit 0a8c3a4

Browse files
authored
Merge pull request #133 from mexus/patch-1
OOM behaviour in `vec-alloc.md`
2 parents 02ef0fb + 5ceb425 commit 0a8c3a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vec-alloc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ that, we'll need to use the rest of the heap APIs. These basically allow us to
3737
talk directly to Rust's allocator (jemalloc by default).
3838

3939
We'll also need a way to handle out-of-memory (OOM) conditions. The standard
40-
library calls `std::alloc::oom()`, which in turn calls the the `oom` langitem.
41-
By default this just aborts the program by executing an illegal cpu instruction.
40+
library calls `std::alloc::oom()`, which in turn calls the the `oom` langitem,
41+
which aborts the program in a platform-specific manner.
4242
The reason we abort and don't panic is because unwinding can cause allocations
4343
to happen, and that seems like a bad thing to do when your allocator just came
4444
back with "hey I don't have any more memory".

0 commit comments

Comments
 (0)