131 |
|
// % memory in use |
132 |
|
if(useCache) { |
133 |
|
// NOTE: we take cache as being "probably free" for this check |
134 |
< |
curValue = (1 - ((memoryFree + memoryCache) / memoryTotal)) * 100; |
134 |
> |
curValue = (1 - (((double)memoryFree + (double)memoryCache) / (double)memoryTotal)) * 100; |
135 |
|
} else { |
136 |
< |
curValue = (1 - (memoryFree / memoryTotal)) * 100; |
136 |
> |
curValue = (1 - ((double)memoryFree / (double)memoryTotal)) * 100; |
137 |
|
} |
138 |
|
// normal check |
139 |
|
newThreshold = checkAttributeThreshold(curValue, reg, false); |