summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2015-04-06 18:45:41 +0000
committerdchagin <dchagin@FreeBSD.org>2015-04-06 18:45:41 +0000
commitfd38dba27d47f0844d52795ce6f13285b00145c2 (patch)
tree892fef8229ad8f63314b15e7d97adc72831323d2
parent1290072850dee6a07937982f737ea50dba23a272 (diff)
downloadFreeBSD-src-fd38dba27d47f0844d52795ce6f13285b00145c2.zip
FreeBSD-src-fd38dba27d47f0844d52795ce6f13285b00145c2.tar.gz
Properly calculate "UMA Zones" per cpu cache size. Avoid allocating
an extra struct uma_cache since the struct uma_zone already has one. PR: 199169 Submitted by: luke.tw gmail com MFC after: 1 week
-rw-r--r--sys/vm/uma_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 7abde8d..2723e97 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -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 + 1));
+ (sizeof(struct uma_cache) * (mp_maxid));
args.ctor = zone_ctor;
args.dtor = zone_dtor;
args.uminit = zero_init;
OpenPOWER on IntegriCloud