From 1e70063e885540667e1873787e6b21f5c6704ac4 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 31 May 2015 00:13:08 -0500 Subject: [PATCH] Save memory by avoiding padding after sha1_hash fields --- include/wimlib/blob_table.h | 2 +- include/wimlib/inode.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wimlib/blob_table.h b/include/wimlib/blob_table.h index 6dbbe55a..ee1cd0fa 100644 --- a/include/wimlib/blob_table.h +++ b/include/wimlib/blob_table.h @@ -108,7 +108,7 @@ struct blob_descriptor { struct wim_inode *back_inode; u32 back_stream_id; }; - }; + } _packed_attribute; /* union is SHA1_HASH_SIZE bytes */ /* Number of times this blob is referenced by file streams in WIM * images. See blob_decrement_refcnt() for information about the diff --git a/include/wimlib/inode.h b/include/wimlib/inode.h index 3fbb4039..777a05b5 100644 --- a/include/wimlib/inode.h +++ b/include/wimlib/inode.h @@ -70,7 +70,7 @@ struct wim_inode_stream { union { u8 _stream_hash[SHA1_HASH_SIZE]; struct blob_descriptor *_stream_blob; - }; + } _packed_attribute; /* union is SHA1_HASH_SIZE bytes */ /* 'stream_resolved' determines whether 'stream_hash' or 'stream_blob' * is valid as described above. */ -- 2.43.0