Author: dchagin Date: Sun Apr 12 06:21:58 2015 New Revision: 281451 URL: https://svnweb.freebsd.org/changeset/base/281451
Log: Rework r281162. Indeed, the flexible array member is preferable here. Suggested by: Justin T. Gibbs MFC after: 3 days Modified: head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Apr 12 06:18:24 2015 (r281450) +++ head/sys/vm/uma_core.c Sun Apr 12 06:21:58 2015 (r281451) @@ -1822,7 +1822,7 @@ uma_startup(void *bootmem, int boot_page #endif args.name = "UMA Zones"; args.size = sizeof(struct uma_zone) + - (sizeof(struct uma_cache) * (mp_maxid)); + (sizeof(struct uma_cache) * (mp_maxid + 1)); args.ctor = zone_ctor; args.dtor = zone_dtor; args.uminit = zero_init; Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Sun Apr 12 06:18:24 2015 (r281450) +++ head/sys/vm/uma_int.h Sun Apr 12 06:21:58 2015 (r281451) @@ -311,7 +311,7 @@ struct uma_zone { * This HAS to be the last item because we adjust the zone size * based on NCPU and then allocate the space for the zones. */ - struct uma_cache uz_cpu[1]; /* Per cpu caches */ + struct uma_cache uz_cpu[]; /* Per cpu caches */ }; /* _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"