diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-04-10 09:24:44 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-04-10 09:24:44 +0000 |
commit | aad4b9d1e82a32a2816eef0332b7ccba67370b91 (patch) | |
tree | d5ccdc0203aeee358d625bc0a53fbe3a40e48064 /lib/libc | |
parent | 4bfe86c04275d079c0da0c1336974ecd09cb65aa (diff) |
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/malloc.3 | 6 | ||||
-rw-r--r-- | lib/libc/stdlib/malloc.c | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index f384a14d4a56c..fe2500f9a7bec 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -152,7 +152,7 @@ and lowercase means that the behavior is not set, or off. .Bl -tag -width indent .It A All warnings (except for the warning about unknown -flags being set), and failure to allocate memory become fatal. +flags being set) become fatal. The process will call .Xr abort 3 in these cases. @@ -370,10 +370,6 @@ The allocation functions were compiled with .Dq EXTRA_SANITY defined, and an error was found during the additional error checking. Consult the source code for further information. -.It "allocation failed -If the -.Dq A -option is specified it is a fatal error for an allocation function to fail. .It "mmap(2) failed, check limits This most likely means that the system is dangerously overloaded or that the process' limits are incorrectly specified. diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index ac0dd485093c1..412171840dfdd 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -715,9 +715,6 @@ imalloc(size_t size) else result = malloc_pages(size); - if (malloc_abort && !result) - wrterror("allocation failed.\n"); - if (malloc_zero && result) memset(result, 0, size); @@ -1067,6 +1064,7 @@ malloc(size_t size) if (malloc_active++) { wrtwarning("recursive call.\n"); malloc_active--; + THREAD_UNLOCK(); return (0); } if (!malloc_started) |