diff options
| author | Sheldon Hearn <sheldonh@FreeBSD.org> | 1999-12-22 17:04:46 +0000 |
|---|---|---|
| committer | Sheldon Hearn <sheldonh@FreeBSD.org> | 1999-12-22 17:04:46 +0000 |
| commit | b3c5295256b43dd753255e0dc0f876d613c19323 (patch) | |
| tree | e13145cdf6955fbd5c056fd74d0ce7d753389a71 | |
| parent | 440b92f03f9199b953de5b18bdb5862d8a025585 (diff) | |
Notes
| -rw-r--r-- | lib/libc/stdlib/malloc.3 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index 764bad1033de..f4e75e2f748f 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -264,7 +264,10 @@ The and .Fn calloc functions return a pointer to the allocated memory if successful; otherwise -a NULL pointer is returned. +a NULL pointer is returned and +.Va errno +is set to +.Er ENOMEM . .Pp The .Fn realloc @@ -277,6 +280,10 @@ if successful; otherwise a NULL pointer is returned, in which case the memory referenced by .Fa ptr is still available and intact. +In the case of memory allocation failure, +.Va errno +is set to +.Er ENOMEM . .Pp The .Fn free |
