Index: sys/conf/NOTES =================================================================== --- sys/conf/NOTES +++ sys/conf/NOTES @@ -2842,3 +2842,7 @@ # Kernel support for stats(3). options STATS + +# Try to reduce memory usage. It may come as a tradeoff against performance +# especially on multicore systems. +#options COMPACT Index: sys/conf/options =================================================================== --- sys/conf/options +++ sys/conf/options @@ -1014,3 +1014,6 @@ # gcov support GCOV opt_global.h LINDEBUGFS + +# Try to reduce memory usage +COMPACT opt_global.h Index: sys/sys/systm.h =================================================================== --- sys/sys/systm.h +++ sys/sys/systm.h @@ -154,6 +154,14 @@ } while (0) #endif /* INVARIANTS || _STANDALONE */ +#ifdef _KERNEL +#ifndef COMPACT +#define __aligned_if_not_compact(x) __aligned(x) +#else +#define __aligned_if_not_compact(x) +#endif +#endif + /* * Helpful macros for quickly coming up with assertions with informative * panic messages.