From fcb83e31a0dfd85e4ec105dd656ed405e64c387b Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 30 Sep 2011 20:19:44 -0700 Subject: Allocate buffers dynamically as needed instead of as part of fdinfo struct Previously we'd allocate a buffer of 32k each for each fd up to the compiled in StaticMaxFD, which could be as large as 65535 on some systems (that's the Solaris 64-bit default FD_SETSIZE), resulting in gigabytes of bss allocation on startup. Now we don't allocate until we're actually setting up the fdinfo for use as part of a client<->server connection. Reviewed-by: Jeremy Huddleston --- scope.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scope.h') diff --git a/scope.h b/scope.h index d440130..360cdc5 100644 --- a/scope.h +++ b/scope.h @@ -109,7 +109,7 @@ struct fdinfo Boolean Server; long ClientNumber; FD pair; - unsigned char buffer[BUFFER_SIZE]; + unsigned char *buffer; int bufcount; int bufstart; int buflimit; /* limited writes */ -- cgit v1.2.1