From e87978860b1de6822db001cbc1d313694002ea28 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 22 Apr 2021 03:03:55 +0200 Subject: gzip iovecs always end on the boundary and don't need to be fixed --- ot_fullscrape.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ot_fullscrape.c b/ot_fullscrape.c index e7a1c19..c3c6b34 100644 --- a/ot_fullscrape.c +++ b/ot_fullscrape.c @@ -30,7 +30,7 @@ Full scrapes usually are huge and one does not want to allocate more memory. So lets get them in 512k units */ -#define OT_SCRAPE_CHUNK_SIZE (512*1024) +#define OT_SCRAPE_CHUNK_SIZE (1024*1024) /* "d8:completei%zde10:downloadedi%zde10:incompletei%zdee" */ #define OT_SCRAPE_MAXENTRYLEN 256 @@ -220,9 +220,10 @@ static void fullscrape_make_gzip( int *iovec_entries, struct iovec **iovector, o /* Check if there still is enough buffer left */ while( !strm.avail_out ) { /* Allocate a fresh output buffer at the end of our buffers list */ - r = iovec_fix_increase_or_free( iovec_entries, iovector, strm.next_out, OT_SCRAPE_CHUNK_SIZE ); + r = iovec_increase( iovec_entries, iovector, OT_SCRAPE_CHUNK_SIZE ); if( !r ) { fprintf( stderr, "Problem with iovec_fix_increase_or_free\n" ); + iovec_free( iovec_entries, iovector ); deflateEnd(&strm); return mutex_bucket_unlock( bucket, 0 ); } -- cgit v1.2.3