Hi Eliot. I am very newbie in all this stuff, so I would directly ask you if you could explain me my doubt ;)<br><br><br>StackInterpreter >> flushMethodCacheFrom: memStart to: memEnd <br> "Flush entries in the method cache only if the oop address is within the given memory range. <br>
This reduces overagressive cache clearing. Note the AtCache is fully flushed, 70% of the time <br> cache entries live in newspace, new objects die young"<br> | probe |<br> probe := 0.<br> 1 to: MethodCacheEntries do: [:i | <br>
(methodCache at: probe + MethodCacheSelector) = 0<br> ifFalse: [((((self oop: (methodCache at: probe + MethodCacheSelector) isGreaterThanOrEqualTo: memStart)<br> and: [self oop: (methodCache at: probe + MethodCacheSelector) isLessThan: memEnd])<br>
or: [(self oop: (methodCache at: probe + MethodCacheClass) isGreaterThanOrEqualTo: memStart)<br> and: [self oop: (methodCache at: probe + MethodCacheClass) isLessThan: memEnd]])<br>
or: [(self oop: (methodCache at: probe + MethodCacheMethod) isGreaterThanOrEqualTo: memStart)<br> and: [self oop: (methodCache at: probe + MethodCacheMethod) isLessThan: memEnd]])<br>
ifTrue: [methodCache at: probe + MethodCacheSelector put: 0]].<br> probe := probe + MethodCacheEntrySize].<br> 1 to: AtCacheTotalSize do: [:i | atCache at: i put: 0]<br><br><br>But if I see <br>
<br>CoInterpreter >> flushMethodCache<br> "Flush the method cache. The method cache is flushed on every programming change and garbage collect."<br><br> 1 to: MethodCacheSize do: [ :i | methodCache at: i put: 0 ].<br>
lastMethodCacheProbeWrite := 0. "this for primitiveExternalMethod"<br> cogit unlinkAllSends<br><br><br>So....my newbie question is just why the "cogit unlinkAllSends" is not need in Cog? I mean, why cog doesn't need to do:<br>
<br>CoInterpreter >> flushMethodCacheFrom: memStart to: memEnd <br>
super flushMethodCacheFrom: memStart to: memEnd .<br> self unlinkAllSends.<br><br><br>Thanks for the explanation in advance,<br><br>Mariano<br><br>