diff options
author | brian <brian@FreeBSD.org> | 1999-12-20 20:29:51 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-12-20 20:29:51 +0000 |
commit | ff8174b1b3e9f7d40f556d9af0d8168f7b81cefa (patch) | |
tree | 0f1b79a384d061f785330452ed26aef1497aca77 /usr.sbin/ppp/deflate.c | |
parent | 86f30d4f38c1b3bdc30e15482e3d749c9ad5f159 (diff) | |
download | FreeBSD-src-ff8174b1b3e9f7d40f556d9af0d8168f7b81cefa.zip FreeBSD-src-ff8174b1b3e9f7d40f556d9af0d8168f7b81cefa.tar.gz |
Implement mbuf allocation internally by maintaining 8 buckets of
different sized mbufs, and mallocing them in chunks of 20 mbufs
at a time.
This improves back-to-back throughput by between 7 and 8%
Diffstat (limited to 'usr.sbin/ppp/deflate.c')
-rw-r--r-- | usr.sbin/ppp/deflate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/ppp/deflate.c b/usr.sbin/ppp/deflate.c index 196cf26..9478fdd 100644 --- a/usr.sbin/ppp/deflate.c +++ b/usr.sbin/ppp/deflate.c @@ -53,7 +53,7 @@ struct deflate_state { static char garbage[10]; static u_char EMPTY_BLOCK[4] = { 0x00, 0x00, 0xff, 0xff }; -#define DEFLATE_CHUNK_LEN 1600 /* Allocate mbufs this size */ +#define DEFLATE_CHUNK_LEN (1536 - sizeof(struct mbuf)) static void DeflateResetOutput(void *v) |