Reduce VABC memory usage
BlockExtentWriter caches data in memory up until get gets a complete
extent. For full OTAs, extents are chopped to 2MB chunks. But for
incremental OTAs, extents can be as large as single file size. We have
observed a single extent to span >100MB disk space on pixel. This incurs
significant memory overhead depending on layout of file system image.
To reduce VABC memory usage, bound memory cache by 1MB
Test: th
Bug: 279305177
Change-Id: I75dbdd60f7e9939fc0fcabe7510fc7ff800087be
diff --git a/payload_consumer/bzip_extent_writer.h b/payload_consumer/bzip_extent_writer.h
index 38c041a..4926411 100644
--- a/payload_consumer/bzip_extent_writer.h
+++ b/payload_consumer/bzip_extent_writer.h
@@ -23,7 +23,6 @@
#include <brillo/secure_blob.h>
-#include "update_engine/common/utils.h"
#include "update_engine/payload_consumer/extent_writer.h"
// BzipExtentWriter is a concrete ExtentWriter subclass that bzip-decompresses
@@ -46,7 +45,7 @@
private:
std::unique_ptr<ExtentWriter> next_; // The underlying ExtentWriter.
- bz_stream stream_; // the libbz2 stream
+ bz_stream stream_{}; // the libbz2 stream
brillo::Blob input_buffer_;
};