aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/utils.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-08-08 11:51:27 +0200
committerLukas Larsson <[email protected]>2014-08-08 11:51:27 +0200
commit2525622c384b27581c4b4cb158fc951f15ac5ca3 (patch)
tree15c62ac68a08fe211e5663212e0d8fbdbed0d8f2 /erts/emulator/beam/utils.c
parentbf4d615f04002aebca4e340f9fa0aaf3888e84e2 (diff)
parentad57501215fc02a39abf3fbce978dbc43d010859 (diff)
downloadotp-2525622c384b27581c4b4cb158fc951f15ac5ca3.tar.gz
otp-2525622c384b27581c4b4cb158fc951f15ac5ca3.tar.bz2
otp-2525622c384b27581c4b4cb158fc951f15ac5ca3.zip
Merge branch 'lukas/erts/malloc_failure_errors/OTP-12085' into maint
* lukas/erts/malloc_failure_errors/OTP-12085: erts: Print error reason when malloc fails
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r--erts/emulator/beam/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 72092ec7b0..55f9e68e78 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -3948,6 +3948,9 @@ erts_save_emu_args(int argc, char **argv)
size += sz+1;
}
ptr = (char *) malloc(size);
+ if (!ptr) {
+ ERTS_INTERNAL_ERROR("malloc failed to allocate memory!");
+ }
#ifdef DEBUG
end_ptr = ptr + size;
#endif