diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-30 20:19:44 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-30 20:19:44 -0700 |
commit | fcb83e31a0dfd85e4ec105dd656ed405e64c387b (patch) | |
tree | fe2683f5d3147370b8b95e35e4abff2fe8fb1cc5 /scope.h | |
parent | fafdfa0e1a54e19f11e220340df0557c794fabc6 (diff) | |
download | xscope-fcb83e31a0dfd85e4ec105dd656ed405e64c387b.tar.gz |
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 <jeremyhu@apple.com>
Diffstat (limited to 'scope.h')
-rw-r--r-- | scope.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 */ |