![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
GNU Smalltalk provides methods to query its own internal data structures.
You may determine the real memory address of an object or the real
memory address of the OOP table that points to a given object, by
using messages to the Memory
class, described below.
hash
and identityHash
).
Other methods in ByteArray and Memory allow to read various C types
(doubleAt:
, ucharAt:
, etc.). For examples of using
asOop
and asObject
, look at the Blox source code in
`blox-tk/BloxBasic.st'.
Another interesting class is ObjectMemory. This provides a few methods that enable one to tune the virtual machine's usage of memory; many methods that in the past were instance methods of Smalltalk or class methods of Memory are now class methods of ObjectMemory. In addition, and that's what the rest of this section is about, the virtual machines signals events to its dependents exactly through this class.
The events that can be received are
ObjectMemory quit
was sent or because the specified files were
all filed in. Exiting from within this event might cause an infinite
loop, so be careful.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |