Skip to content

Commit 71b681a

Browse files
committed
---
yaml --- r: 174219 b: refs/heads/batch c: a03701d h: refs/heads/master i: 174217: 893ccc0 174215: 8584478 v: v3
1 parent 4c37485 commit 71b681a

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/issue-18208-method-dispatch-2: 9e1eae4fb9b6527315b4441cf8a0f5ca911d1671
3030
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32-
refs/heads/batch: 5f1ba93ad2793a3c8377c98edf3b753618cc2e77
32+
refs/heads/batch: a03701defaf00f323aeaff033d84d93545448b77
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/batch/src/doc/trpl/ffi.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -164,29 +164,6 @@ pub fn uncompress(src: &[u8]) -> Option<Vec<u8>> {
164164
For reference, the examples used here are also available as an [library on
165165
GitHub](https://github.com/thestinger/rust-snappy).
166166

167-
# Stack management
168-
169-
Rust threads by default run on a *large stack*. This is actually implemented as a
170-
reserving a large segment of the address space and then lazily mapping in pages
171-
as they are needed. When calling an external C function, the code is invoked on
172-
the same stack as the rust stack. This means that there is no extra
173-
stack-switching mechanism in place because it is assumed that the large stack
174-
for the rust thread is plenty for the C function to have.
175-
176-
A planned future improvement (not yet implemented at the time of this writing)
177-
is to have a guard page at the end of every rust stack. No rust function will
178-
hit this guard page (due to Rust's usage of LLVM's `__morestack`). The intention
179-
for this unmapped page is to prevent infinite recursion in C from overflowing
180-
onto other rust stacks. If the guard page is hit, then the process will be
181-
terminated with a message saying that the guard page was hit.
182-
183-
For normal external function usage, this all means that there shouldn't be any
184-
need for any extra effort on a user's perspective. The C stack naturally
185-
interleaves with the rust stack, and it's "large enough" for both to
186-
interoperate. If, however, it is determined that a larger stack is necessary,
187-
there are appropriate functions in the thread spawning API to control the size of
188-
the stack of the thread which is spawned.
189-
190167
# Destructors
191168

192169
Foreign libraries often hand off ownership of resources to the calling code.

0 commit comments

Comments
 (0)