diff -r a454cdfcd470 -r 575272661fc4 MemoryMonitor.st --- a/MemoryMonitor.st Tue Sep 08 13:20:19 1998 +0200 +++ b/MemoryMonitor.st Tue Sep 08 13:23:22 1998 +0200 @@ -546,35 +546,41 @@ super sizeChanged:how. + (width == 0 or:[height == 0]) ifTrue:[ + ^self + ]. + oldSize := oldData size. newSize := width-org+1. (newSize ~~ oldSize) ifTrue:[ - nn := Array new:newSize. - no := Array new:newSize. - nf := Array new:newSize. + nn := Array new:newSize. + no := Array new:newSize. + nf := Array new:newSize. - (newSize > oldSize) ifTrue:[ - nn replaceFrom:1 to:oldSize with:newData. - no replaceFrom:1 to:oldSize with:oldData. - nf replaceFrom:1 to:oldSize with:freeData - ] ifFalse:[ - delta := (oldSize - newSize). - nn replaceFrom:1 with:newData startingAt:delta+1. - no replaceFrom:1 with:oldData startingAt:delta+1. - nf replaceFrom:1 with:freeData startingAt:delta+1. - updateIndex > newSize ifTrue:[ - updateIndex := updateIndex - delta. - ] - ]. - newData := nn. - oldData := no. - freeData := nf. + (newSize > oldSize) ifTrue:[ + nn replaceFrom:1 to:oldSize with:newData. + no replaceFrom:1 to:oldSize with:oldData. + nf replaceFrom:1 to:oldSize with:freeData + ] ifFalse:[ + delta := (oldSize - newSize). + nn replaceFrom:1 with:newData startingAt:delta+1. + no replaceFrom:1 with:oldData startingAt:delta+1. + nf replaceFrom:1 with:freeData startingAt:delta+1. + updateIndex > newSize ifTrue:[ + updateIndex := updateIndex - delta. + ] + ]. + newData := nn. + oldData := no. + freeData := nf. - scale := height asFloat / (maxTotal + 100000). + scale := height asFloat / (maxTotal + 100000). ]. self clear. self redraw. + + "Modified: / 7.9.1998 / 21:41:13 / cg" ! ! !MemoryMonitor methodsFor:'initialization'! @@ -951,5 +957,5 @@ !MemoryMonitor class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.56 1998-08-05 13:35:34 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/MemoryMonitor.st,v 1.57 1998-09-08 11:23:22 cg Exp $' ! !