From a2750dee0e4c374ae51f83eead7eb7df3c018d95 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 4 May 2019 23:20:28 +0200 Subject: rdsquashfs: malloc extraction buffers ahead of time Instead of malloc/freeing the buffers for every file, allocate them once, ahead of time. Signed-off-by: David Oberhollenzer --- unpack/rdsquashfs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'unpack/rdsquashfs.h') diff --git a/unpack/rdsquashfs.h b/unpack/rdsquashfs.h index 0961591..c06afb2 100644 --- a/unpack/rdsquashfs.h +++ b/unpack/rdsquashfs.h @@ -35,6 +35,9 @@ typedef struct { frag_reader_t *frag; int sqfsfd; int flags; + + void *buffer; + void *scratch; } unsqfs_info_t; tree_node_t *tree_node_from_inode(sqfs_inode_generic_t *inode, -- cgit v1.2.3