if $node != 0
printf " #%2d: ", $i
while $node != 0
- printf "%d, ", 4096 << $node->index
- set $kb = $kb + (4 << $node->index)
+ printf "%d, ", ($node->index + 1) << 12
+ set $kb = $kb + (($node->index + 1) << 2)
set $node = $node->next
end
printf "ends.\n"
set $node = $arg0->active
set $done = 0
while $done == 0
- set $size = $size + (4096 << $node->index)
+ set $size = $size + (($node->index + 1) << 12)
set $free = $free + ($node->endp - $node->first_avail)
set $nodes = $nodes + 1
set $node = $node->next
if node != 0:
while node != 0:
noded = node.dereference()
- kb = kb + (4 << int(noded['index']))
+ kb = kb + ((int(noded['index']) + 1) << 2)
node = noded['next']
i = i + 1
self.total_free_blocks[salloc] = kb
done = 0
while done == 0:
noded = node.dereference()
- size = size + (4096 << int(noded['index']))
+ size = size + ((int(noded['index']) + 1) << 12)
free = free + (noded['endp'] - noded['first_avail'])
nodes = nodes + 1
node = noded['next']