Skip to content

Commit 1974cf9

Browse files
committed
rt: Move RED_ZONE_SIZE to rust_task.cpp
1 parent 249f017 commit 1974cf9

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/rt/rust_internal.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,6 @@ static size_t const BUF_BYTES = 2048;
9494
// The error status to use when the process fails
9595
#define PROC_FAIL_CODE 101;
9696

97-
// FIXME: We want this to be 128 but need to slim the red zone calls down
98-
#ifdef __i386__
99-
#define RED_ZONE_SIZE 2048
100-
#endif
101-
102-
#ifdef __x86_64__
103-
#define RED_ZONE_SIZE 2048
104-
#endif
105-
10697
// Every reference counted object should use this macro and initialize
10798
// ref_count.
10899

src/rt/rust_task.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414

1515
#include "globals.h"
1616

17+
// The amount of extra space at the end of each stack segment, available
18+
// to the rt, compiler and dynamic linker for running small functions
19+
// FIXME: We want this to be 128 but need to slim the red zone calls down
20+
#ifdef __i386__
21+
#define RED_ZONE_SIZE 2048
22+
#endif
23+
24+
#ifdef __x86_64__
25+
#define RED_ZONE_SIZE 2048
26+
#endif
1727

1828
// Stack size
1929
size_t g_custom_min_stack_size = 0;

0 commit comments

Comments
 (0)