summaryrefslogtreecommitdiff
path: root/unpack/rdsquashfs.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-04 23:20:28 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-04 23:20:28 +0200
commita2750dee0e4c374ae51f83eead7eb7df3c018d95 (patch)
treeeb02eafaecd5a966d216cb2d97b272ab2731f121 /unpack/rdsquashfs.h
parent09bdcdb1f3f2d7810ea956842bc7551d9ca26f92 (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack/rdsquashfs.h')
-rw-r--r--unpack/rdsquashfs.h3
1 files changed, 3 insertions, 0 deletions
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,