Date: Sun, 12 Apr 2015 06:21:59 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281451 - head/sys/vm Message-ID: <201504120621.t3C6LxAV095209@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */ }; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504120621.t3C6LxAV095209>