Squeak Class Documentation category index | class index  
 
ExternalAddress
  category: FFI-Kernel
  superclass: ByteArray
  subclasses:

An ExternalAddress is an opaque handle to objects outside Smalltalk memory (e.g., a pointer).

instance methods
  accessing
  byteAt:
byteAt:put:
isExternalAddress

  converting
  asInteger
fromInteger:

  initialize-release
  beNull
free

  printing
  printOn:

  private
  asByteArrayPointer

class methods
  class initialization
  startUp:

  instance creation
  allocate:
new
new:

instance methods
  accessing top  
 

byteAt:

Go through a different primitive since the receiver describes data in the outside world


 

byteAt:put:

Go through a different primitive since the receiver describes data in the outside world


 

isExternalAddress

Return true if the receiver describes an object in the outside world


  converting top  
 

asInteger

convert address to integer


 

fromInteger:

set my handle to point at address.


  initialize-release top  
 

beNull

Make the receiver a NULL pointer


 

free

Primitive. Free the object pointed to on the external heap.
Dangerous - may break your system if the receiver hasn't been
allocated by ExternalAddress class>>allocate:. No checks are done.


  printing top  
 

printOn:

print this as a hex address ('@ 16rFFFFFFFF') to distinguish it from ByteArrays


  private top  
 

asByteArrayPointer

Return a ByteArray describing a pointer to the contents of the receiver.


class methods
  class initialization top  
 

startUp:

This message is sent to registered classes when the system is coming up.


  instance creation top  
 

allocate:

Primitive. Allocate an object on the external heap.


 

new

External addresses are always 4 bytes long


 

new:

You better don't try this...