diff options
author | netchild <netchild@FreeBSD.org> | 2006-01-04 19:19:42 +0000 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2006-01-04 19:19:42 +0000 |
commit | 8852f0af379bc399b1aa52f604c813e23ac9e162 (patch) | |
tree | 20a5a0f391a2c979891c77a5e19dc7f6c83b2bf4 | |
parent | 998ec2639b9861f903587434ee41b7b8eaa7bba6 (diff) | |
download | FreeBSD-src-8852f0af379bc399b1aa52f604c813e23ac9e162.zip FreeBSD-src-8852f0af379bc399b1aa52f604c813e23ac9e162.tar.gz |
Convert the PAGE_SIZE check into a CTASSERT.
Suggested by: jhb
-rw-r--r-- | sys/vm/vm_pageq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_pageq.c b/sys/vm/vm_pageq.c index 0acdf1b..ed9c86e 100644 --- a/sys/vm/vm_pageq.c +++ b/sys/vm/vm_pageq.c @@ -79,7 +79,9 @@ vm_coloring_init(void) setPQL2(&pq_cachesize, &pq_cachenways); - if (pq_cachesize > 0 && pq_cachenways > 0 && PAGE_SIZE > 1024) + CTASSERT(PAGE_SIZE/1024 > 0); + + if (pq_cachesize > 0 && pq_cachenways > 0) PQ_NUMCOLORS = pq_cachesize / (PAGE_SIZE/1024) / \ pq_cachenways; else |