summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/calloc.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-05-08 09:09:18 +0000
committeralfred <alfred@FreeBSD.org>2001-05-08 09:09:18 +0000
commit4285179bdea63f95d7ac30b1ec7696b0cf0c7508 (patch)
tree201d2bbe65bb585724521a8218d326a84fb99f50 /lib/libc/stdlib/calloc.c
parent211ed6f8ba4c86a6625418c771e085b4507b5b71 (diff)
downloadFreeBSD-src-4285179bdea63f95d7ac30b1ec7696b0cf0c7508.zip
FreeBSD-src-4285179bdea63f95d7ac30b1ec7696b0cf0c7508.tar.gz
Remove an 'optimization' I hope to never see again.
The pipe code could not handle running out of kva, it would panic if that happened. Instead return ENFILE to the application which is an acceptable error return from pipe(2). There was some slightly tricky things that needed to be worked on, namely that the pipe code can 'realloc' the size of the buffer if it detects that the pipe could use a bit more room. However if it failed the reallocation it could not cope and would panic. Fix this by attempting to grow the pipe while holding onto our old resources. If all goes well free the old resources and use the new ones, otherwise continue to use the smaller buffer already allocated. While I'm here add a few blank lines for style(9) and remove 'register'.
Diffstat (limited to 'lib/libc/stdlib/calloc.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud