Fix a SFBUF memory leak in sendfile(). We were not properly tracking
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 24 Aug 2004 21:53:41 +0000 (21:53 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 24 Aug 2004 21:53:41 +0000 (21:53 +0000)
commite66bab2b96de58a1196be477e19ba1d0092adc54
treeefe8bd35a4facea891c5f234d3872d5a2e5b165d
parent12ff98e89f698059cbc794dfea8340efbd686812
Fix a SFBUF memory leak in sendfile().  We were not properly tracking
references which would lead to SFBUFs not getting freed when two or more
sendfile()'s are operating on the same file at the same time (e.g. parallel
ftp downloads of the same file).

Get rid of the sf_buf->aux1 and aux2 hacks for sendfile.

Add a sysctl to allow the number of free SFBUFs to be monitored.
sys/kern/kern_sfbuf.c
sys/kern/uipc_syscalls.c
sys/sys/sfbuf.h