aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-05-11 09:22:53 +0200
committerLukas Larsson <[email protected]>2016-05-11 09:22:53 +0200
commit76378f21242b8036bac1b187e895bcafa28201da (patch)
tree7b4f7927292cb193854b3012573d17e371e4ed6a /erts/emulator/beam/erl_process.h
parent8bc9c88cd98bbbcc18265a7aed830b73f5133cf6 (diff)
parent36dd5c3dd86c91d04a7fc13fd2a89b10af64db5a (diff)
downloadotp-76378f21242b8036bac1b187e895bcafa28201da.tar.gz
otp-76378f21242b8036bac1b187e895bcafa28201da.tar.bz2
otp-76378f21242b8036bac1b187e895bcafa28201da.zip
Merge branch 'lukas/erts/max_heap_size/OTP-13174'
* lukas/erts/max_heap_size/OTP-13174: erts: Fix max heap size exit when in hipe mode Update preloaded modules erts: Fix pre-bif yield current_function erts: Implement max_heap_size process flag
Diffstat (limited to 'erts/emulator/beam/erl_process.h')
-rw-r--r--erts/emulator/beam/erl_process.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index 59da9c1779..12a919bc87 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -918,6 +918,15 @@ struct ErtsPendingSuspend_ {
# define BIN_OLD_VHEAP_SZ(p) (p)->bin_old_vheap_sz
# define BIN_OLD_VHEAP(p) (p)->bin_old_vheap
+# define MAX_HEAP_SIZE_GET(p) ((p)->max_heap_size >> 2)
+# define MAX_HEAP_SIZE_SET(p, sz) ((p)->max_heap_size = ((sz) << 2) | \
+ MAX_HEAP_SIZE_FLAGS_GET(p))
+# define MAX_HEAP_SIZE_FLAGS_GET(p) ((p)->max_heap_size & 0x3)
+# define MAX_HEAP_SIZE_FLAGS_SET(p, flags) ((p)->max_heap_size = flags | \
+ ((p)->max_heap_size & ~0x3))
+# define MAX_HEAP_SIZE_KILL 1
+# define MAX_HEAP_SIZE_LOG 2
+
struct process {
ErtsPTabElementCommon common; /* *Need* to be first in struct */
@@ -935,6 +944,7 @@ struct process {
Uint heap_sz; /* Size of heap in words */
Uint min_heap_size; /* Minimum size of heap (in words). */
Uint min_vheap_size; /* Minimum size of virtual heap (in words). */
+ Uint max_heap_size; /* Maximum size of heap (in words). */
#if !defined(NO_FPE_SIGNALS) || defined(HIPE)
volatile unsigned long fp_exception;
@@ -1285,6 +1295,8 @@ typedef struct {
Uint min_vheap_size; /* Minimum virtual heap size */
int priority; /* Priority for process. */
Uint16 max_gen_gcs; /* Maximum number of gen GCs before fullsweep. */
+ Uint max_heap_size; /* Maximum heap size in words */
+ Uint max_heap_flags; /* Maximum heap flags (kill | log) */
int scheduler;
} ErlSpawnOpts;