echo \Components\System\Helpers\Html::sortheader($this->MYREQUEST, $this->MY_SELF_WO_SORT, 'C', 'Created at', "&OB=" . $this->MYREQUEST['OB']); ?> </th> <?php if ($fieldname == 'info') { $cols += 1; ?> <th><?php echo \Components\System\Helpers\Html::sortheader($this->MYREQUEST, $this->MY_SELF_WO_SORT, 'T', 'Timeout', "&OB=" . $this->MYREQUEST['OB']); ?> </th> <?php } ?> <th><?php echo \Components\System\Helpers\Html::sortheader($this->MYREQUEST, $this->MY_SELF_WO_SORT, 'D', 'Deleted at', "&OB=" . $this->MYREQUEST['OB']); ?> </th> </tr> </thead> <tbody> <?php // builds list with alpha numeric sortable keys // $list = array(); foreach ($this->cache[$this->scope_list[$this->MYREQUEST['SCOPE']]] as $i => $entry) { switch ($this->MYREQUEST['SORT1']) { case 'A': $k = sprintf('%015d-', $entry['access_time']); break; case 'H':
$ptr = 0; foreach ($this->mem['block_lists'][$i] as $block) { if ($block['offset'] != $ptr) { ++$nseg; } $ptr = $block['offset'] + $block['size']; // Only consider blocks <5M for the fragmentation % if ($block['size'] < 5 * 1024 * 1024) { $fragsize += $block['size']; } $freetotal += $block['size']; } $freeseg += count($this->mem['block_lists'][$i]); } if ($freeseg > 1) { $frag = sprintf("%.2f%% (%s out of %s in %d fragments)", $fragsize / $freetotal * 100, \Components\System\Helpers\Html::bsize($fragsize), \Components\System\Helpers\Html::bsize($freetotal), $freeseg); } else { $frag = "0%"; } if ($this->graphics_avail) { $size = 'width=' . (2 * GRAPH_SIZE + 150) . ' height=' . (GRAPH_SIZE + 10); echo "<img alt=\"\" {$size} src=\"index.php?option={$this->option}&controller={$this->controller}&task=mkimage&IMG=3&time={$time}\" />"; } echo "<br />Fragmentation: {$frag}"; echo "</th>"; echo "</tr>"; if (isset($this->mem['adist'])) { foreach ($this->mem['adist'] as $i => $v) { $cur = pow(2, $i); $nxt = pow(2, $i + 1) - 1; if ($i == 0) {