equal
deleted
inserted
replaced
7 inclusion of the above copyright notice. This software may not |
7 inclusion of the above copyright notice. This software may not |
8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
|
13 "{ Package: 'stx:libtool' }" |
12 "{ Package: 'stx:libtool' }" |
14 |
13 |
15 StandardSystemView subclass:#MemoryUsageView |
14 StandardSystemView subclass:#MemoryUsageView |
16 instanceVariableNames:'rawInfo info list sortBlock titleLabel' |
15 instanceVariableNames:'rawInfo info list sortBlock titleLabel' |
17 classVariableNames:'' |
16 classVariableNames:'' |
579 [ |behaviorFlag| |
578 [ |behaviorFlag| |
580 |
579 |
581 behaviorFlag := Behavior flagBehavior. |
580 behaviorFlag := Behavior flagBehavior. |
582 |
581 |
583 ObjectMemory allObjectsDo:[:o | |
582 ObjectMemory allObjectsDo:[:o | |
584 |infoArray class bytes| |
583 |infoArray class bytes flags| |
585 |
584 |
586 "/ o isBehavior ifTrue:[ |
585 "/ o isBehavior ifTrue:[ |
587 class := o class. |
586 class := o class. |
588 (class flags notNil and:[(class flags bitAnd:behaviorFlag) ~~ 0]) ifTrue:[ |
587 flags := class flags. |
589 Error |
588 (flags notNil and:[flags class == SmallInteger]) ifTrue:[ |
590 handle:[:ex |] |
589 (flags bitAnd:behaviorFlag) ~~ 0 ifTrue:[ |
591 do:[ |
590 Error |
592 o isObsolete ifTrue:[ |
591 handle:[:ex |] |
593 class := #ObsoleteClass |
592 do:[ |
594 ] ifFalse:[ |
593 o isObsolete ifTrue:[ |
595 o isMeta ifTrue:[ |
594 class := #ObsoleteClass |
596 o isPrivate ifTrue:[ |
595 ] ifFalse:[ |
597 class := #PrivateMetaclass |
596 o isMeta ifTrue:[ |
|
597 o isPrivate ifTrue:[ |
|
598 class := #PrivateMetaclass |
|
599 ] ifFalse:[ |
|
600 class := #Metaclass |
|
601 ] |
598 ] ifFalse:[ |
602 ] ifFalse:[ |
599 class := #Metaclass |
603 o isPrivate ifTrue:[ |
|
604 class := #PrivateClass |
|
605 ] ifFalse:[ |
|
606 (o isNameSpace |
|
607 and:[o ~~ NameSpace |
|
608 and:[o ~~ Smalltalk]]) |
|
609 ifTrue:[ |
|
610 class := #NameSpace |
|
611 ] ifFalse:[ |
|
612 class := #Class |
|
613 ] |
|
614 ] |
600 ] |
615 ] |
601 ] ifFalse:[ |
|
602 o isPrivate ifTrue:[ |
|
603 class := #PrivateClass |
|
604 ] ifFalse:[ |
|
605 (o isNameSpace |
|
606 and:[o ~~ NameSpace |
|
607 and:[o ~~ Smalltalk]]) |
|
608 ifTrue:[ |
|
609 class := #NameSpace |
|
610 ] ifFalse:[ |
|
611 class := #Class |
|
612 ] |
|
613 ] |
|
614 ] |
616 ] |
615 ] |
617 ] |
616 ] |
618 ]. |
617 ]. |
619 ]. |
618 |
620 |
619 bytes := ObjectMemory sizeOf:o. |
621 bytes := ObjectMemory sizeOf:o. |
620 infoArray := rawInfo at:class ifAbsent:[]. |
622 infoArray := rawInfo at:class ifAbsent:[]. |
621 infoArray isNil ifTrue:[ |
623 infoArray isNil ifTrue:[ |
635 myProcess priority:myPriority. |
637 myProcess priority:myPriority. |
636 ]. |
638 ]. |
637 ] |
639 ] |
638 |
640 |
639 "Modified: / 19-09-1995 / 15:29:10 / claus" |
641 "Modified: / 19-09-1995 / 15:29:10 / claus" |
640 "Modified: / 16-07-2006 / 10:45:32 / cg" |
642 "Modified: / 11-10-2007 / 14:46:55 / cg" |
641 ! ! |
643 ! ! |
642 |
644 |
643 !MemoryUsageView methodsFor:'realization'! |
645 !MemoryUsageView methodsFor:'realization'! |
644 |
646 |
645 realize |
647 realize |
652 ! ! |
654 ! ! |
653 |
655 |
654 !MemoryUsageView class methodsFor:'documentation'! |
656 !MemoryUsageView class methodsFor:'documentation'! |
655 |
657 |
656 version |
658 version |
657 ^ '$Header: /cvs/stx/stx/libtool/MemoryUsageView.st,v 1.47 2006-07-17 11:33:54 cg Exp $' |
659 ^ '$Header: /cvs/stx/stx/libtool/MemoryUsageView.st,v 1.48 2007-10-11 12:47:11 cg Exp $' |
658 ! ! |
660 ! ! |