|
|
@@ -146,15 +146,7 @@ wait_for_next_run() {
|
|
|
sleep "$interval"
|
|
|
}
|
|
|
|
|
|
-reclaim_run() {
|
|
|
- update_states
|
|
|
-
|
|
|
- [ -n "$debug" ] && dump_reclaim_args
|
|
|
-
|
|
|
- if ! should_reclaim; then
|
|
|
- return
|
|
|
- fi
|
|
|
-
|
|
|
+start_reclaim() {
|
|
|
reclaim_size_kb="$(calc_size_to_reclaim_kb)"
|
|
|
|
|
|
if ! reclaim "${reclaim_size_kb}K"; then
|
|
|
@@ -163,10 +155,18 @@ reclaim_run() {
|
|
|
fi
|
|
|
|
|
|
log_info "reclaimed memory ${reclaim_size_kb}K"
|
|
|
+}
|
|
|
|
|
|
- [ -n "$debug" ] && dump_memusage
|
|
|
+reclaim_run() {
|
|
|
+ update_states
|
|
|
+
|
|
|
+ [ -n "$debug" ] && dump_reclaim_args
|
|
|
+
|
|
|
+ if should_reclaim; then
|
|
|
+ start_reclaim
|
|
|
+ fi
|
|
|
|
|
|
- return
|
|
|
+ [ -n "$debug" ] && dump_memusage
|
|
|
}
|
|
|
|
|
|
while getopts "s:t:i:l:dh" arg; do
|