Rework r281162. Indeed, the flexible array member is preferable here.
Suggested by: Justin T. Gibbs MFC after: 3 days
This commit is contained in:
parent
517aea2c14
commit
51cfb0be84
@ -1822,7 +1822,7 @@ uma_startup(void *bootmem, int boot_pages)
|
||||
#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;
|
||||
|
@ -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 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user