109 !MemoryMonitorView methodsFor:'drawing'! |
109 !MemoryMonitorView methodsFor:'drawing'! |
110 |
110 |
111 displayKilo:aNumber name:nm y:y |
111 displayKilo:aNumber name:nm y:y |
112 |s| |
112 |s| |
113 |
113 |
114 aNumber >= (1024*1024*99) ifTrue:[ |
114 aNumber >= (1024*1024*1024*2) ifTrue:[ |
115 s := nm , ((aNumber // (1024*1024)) printStringLeftPaddedTo:5) , 'M '. |
115 s := nm , ((aNumber // (1024*1024*1024)) printStringLeftPaddedTo:5) , 'G '. |
116 ] ifFalse:[ |
116 ] ifFalse:[ |
117 s := nm , ((aNumber // 1024) printStringLeftPaddedTo:5) , 'k '. |
117 aNumber >= (1024*1024*16) ifTrue:[ |
|
118 s := nm , ((aNumber // (1024*1024)) printStringLeftPaddedTo:5) , 'M '. |
|
119 ] ifFalse:[ |
|
120 s := nm , ((aNumber // 1024) printStringLeftPaddedTo:5) , 'k '. |
|
121 ]. |
118 ]. |
122 ]. |
119 self displayOpaqueString:s x:0 y:y. |
123 self displayOpaqueString:s x:0 y:y. |
120 |
124 |
121 "Modified: / 23.9.1998 / 13:19:04 / cg" |
125 "Modified: / 23.9.1998 / 13:19:04 / cg" |
122 ! |
126 ! |
330 |
334 |
331 |oldSpaceSize newSpaceSize memUsed oldMemUsed newMemUsed freeMem free2 |
335 |oldSpaceSize newSpaceSize memUsed oldMemUsed newMemUsed freeMem free2 |
332 mallocAllocated mallocTotal |
336 mallocAllocated mallocTotal |
333 codeUsed numWeak numRem numLifoRem tenureAge igcPhase |
337 codeUsed numWeak numRem numLifoRem tenureAge igcPhase |
334 minScavengeReclamation lastScavengeReclamation scavengeCount |
338 minScavengeReclamation lastScavengeReclamation scavengeCount |
335 y half s fontHeight fontDescent total n prevMallocAllocated prevMallocTotal| |
339 y half s fontHeight fontAscent fontDescent |
|
340 limit total n prevMallocAllocated prevMallocTotal| |
336 |
341 |
337 oldMemUsed := ObjectMemory oldSpaceUsed + ObjectMemory symSpaceUsed. |
342 oldMemUsed := ObjectMemory oldSpaceUsed + ObjectMemory symSpaceUsed. |
338 newMemUsed := ObjectMemory newSpaceUsed. |
343 newMemUsed := ObjectMemory newSpaceUsed. |
339 freeMem := ObjectMemory freeListSpace. |
344 freeMem := ObjectMemory freeListSpace. |
340 oldSpaceSize := ObjectMemory oldSpaceSize + ObjectMemory symSpaceSize. |
345 oldSpaceSize := ObjectMemory oldSpaceSize + ObjectMemory symSpaceSize. |
341 newSpaceSize := ObjectMemory newSpaceSize. |
346 newSpaceSize := ObjectMemory newSpaceSize. |
342 |
347 |
343 mallocAllocated := ObjectMemory mallocAllocated. |
348 mallocAllocated := ObjectMemory mallocAllocated. |
344 mallocTotal := ObjectMemory mallocTotal. |
349 mallocTotal := ObjectMemory mallocTotal. |
|
350 limit := ObjectMemory maxOldSpace. |
345 |
351 |
346 memUsed := oldMemUsed + newMemUsed "- freeMem". |
352 memUsed := oldMemUsed + newMemUsed "- freeMem". |
347 total := oldSpaceSize + newSpaceSize. |
353 total := oldSpaceSize + newSpaceSize. |
348 free2 := ObjectMemory freeSpace. |
354 free2 := ObjectMemory freeSpace. |
349 |
355 |
350 self paint:White on:Black. |
356 self paint:White on:Black. |
351 |
357 |
352 fontDescent := font descent. |
358 fontDescent := font descent. |
|
359 fontAscent := font ascent. |
353 fontHeight := font height + fontDescent. |
360 fontHeight := font height + fontDescent. |
354 half := height // 2 + fontDescent. |
361 half := height // 2 + fontDescent. |
355 |
362 |
356 y := half - (fontHeight * 8). |
363 y := half - (fontHeight * 8). |
357 |
364 |