equal
deleted
inserted
replaced
|
1 "{ Encoding: utf8 }" |
|
2 |
1 " |
3 " |
2 COPYRIGHT (c) 1992 by Claus Gittinger |
4 COPYRIGHT (c) 1992 by Claus Gittinger |
3 All Rights Reserved |
5 All Rights Reserved |
4 |
6 |
5 This software is furnished under a license and may be used |
7 This software is furnished under a license and may be used |
133 |
135 |
134 super initialize. |
136 super initialize. |
135 self label:'Memory Usage'. |
137 self label:'Memory Usage'. |
136 |
138 |
137 headLine := ' Class' paddedTo:47 with:Character space. |
139 headLine := ' Class' paddedTo:47 with:Character space. |
138 headLine := headLine , '# of Insts Bytes Avg sz Max sz %Mem %Accum. +Insts +Bytes'. |
140 headLine := headLine , ' # of Insts Bytes Avg sz Max sz %Mem %Accum. +Insts +Bytes'. |
139 |
141 |
140 titleLabel := Label in:self. |
142 titleLabel := Label in:self. |
141 titleLabel origin:(0.0 @ 0.0) corner:(1.0 @ titleLabel preferredHeight). |
143 titleLabel origin:(0.0 @ 0.0) corner:(1.0 @ titleLabel preferredHeight). |
142 titleLabel borderWidth:0. |
144 titleLabel borderWidth:0. |
143 titleLabel label:headLine. |
145 titleLabel label:headLine. |
636 ] ifFalse:[ |
638 ] ifFalse:[ |
637 ^ self. |
639 ^ self. |
638 ]. |
640 ]. |
639 ] |
641 ] |
640 ]. |
642 ]. |
|
643 aBlock value:insts |
641 ] ifFalse:[ |
644 ] ifFalse:[ |
642 insts := class allInstances. |
645 ObjectMemory allInstancesOf:class do:aBlock. |
643 ]. |
646 ]. |
644 aBlock value:insts |
|
645 |
647 |
646 "Created: / 11-05-2011 / 14:36:00 / cg" |
648 "Created: / 11-05-2011 / 14:36:00 / cg" |
647 ! ! |
649 ! ! |
648 |
650 |
649 !MemoryUsageView methodsFor:'menu-sorting'! |
651 !MemoryUsageView methodsFor:'menu-sorting'! |
793 |nameLen countLen bytesUsedSize avgSizeLen maxSizeLen accumMemoryUseLen| |
795 |nameLen countLen bytesUsedSize avgSizeLen maxSizeLen accumMemoryUseLen| |
794 |
796 |
795 rawInfo isNil ifTrue:[^ self]. |
797 rawInfo isNil ifTrue:[^ self]. |
796 |
798 |
797 nameLen := 50. |
799 nameLen := 50. |
798 countLen := 7. |
800 countLen := 9. |
799 bytesUsedSize := 10. |
801 bytesUsedSize := 12. |
800 avgSizeLen := 10. |
802 avgSizeLen := 10. |
801 maxSizeLen := 8. |
803 maxSizeLen := 8. |
802 accumMemoryUseLen := 7. |
804 accumMemoryUseLen := 7. |
803 |
805 |
804 windowGroup withCursor:Cursor wait do:[ |
806 windowGroup withCursor:Cursor wait do:[ |
1108 ! ! |
1110 ! ! |
1109 |
1111 |
1110 !MemoryUsageView class methodsFor:'documentation'! |
1112 !MemoryUsageView class methodsFor:'documentation'! |
1111 |
1113 |
1112 version |
1114 version |
1113 ^ '$Header: /cvs/stx/stx/libtool/MemoryUsageView.st,v 1.70 2015-02-23 17:04:48 cg Exp $' |
1115 ^ '$Header$' |
1114 ! |
1116 ! |
1115 |
1117 |
1116 version_CVS |
1118 version_CVS |
1117 ^ '$Header: /cvs/stx/stx/libtool/MemoryUsageView.st,v 1.70 2015-02-23 17:04:48 cg Exp $' |
1119 ^ '$Header$' |
1118 ! ! |
1120 ! ! |
1119 |
1121 |