summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2013-09-02 23:35:08 -0700
committerPhil Davis <phil.davis@world.inf.org>2013-09-02 23:35:08 -0700
commit68b253adeefe0c08b1a633208c2caeb4a849b02d (patch)
tree8a98fb88e022f0d0b23eff8945d32397f9dc692c /etc/inc/pfsense-utils.inc
parent0c3a7a05f9dd5f94ae17ec0c524baf00a91a0db0 (diff)
downloadpfsense-68b253adeefe0c08b1a633208c2caeb4a849b02d.zip
pfsense-68b253adeefe0c08b1a633208c2caeb4a849b02d.tar.gz
Use hw.physmem when calculating pfsense_default_state_size
hw.physmem is the actual amount of memory that FreeBSD/pfSense can get its hands on, so use this for the calculation. Backport to 2.1
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 764d010..ac2db3f 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1494,9 +1494,9 @@ function is_fqdn($fqdn) {
function pfsense_default_state_size() {
/* get system memory amount */
$memory = get_memory();
- $avail = $memory[1];
+ $physmem = $memory[0];
/* Be cautious and only allocate 10% of system memory to the state table */
- $max_states = (int) ($avail/10)*1000;
+ $max_states = (int) ($physmem/10)*1000;
return $max_states;
}
OpenPOWER on IntegriCloud