Should reduce the size of that struct and hence memory consumption
during dependency resolution (48 bytes vs. 56 bytes on 64-bit).
Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
struct abstract_pkg {
char *name;
- int dependencies_checked;
pkg_vec_t *pkgs;
- pkg_state_status_t state_status;
- pkg_state_flag_t state_flag;
+ int dependencies_checked:1;
+ pkg_state_status_t state_status:4;
+ pkg_state_flag_t state_flag:11;
/* XXX: This should be abstract_pkg_vec_t for consistency. */
struct abstract_pkg **depended_upon_by;
abstract_pkg_vec_t *provided_by;
abstract_pkg_vec_t *replaced_by;
-};
+} __attribute__((__packed__)) ;
#include "pkg_depends.h"