VDBVirtualMemoryRegion.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 13 Oct 2017 21:38:13 +0100
changeset 48 0076f0700e5e
child 49 2ec7f7ed9242
permissions -rw-r--r--
Added VDBVirtualMemoryMap, a model for memory maps

"{ Package: 'jv:vdb' }"

"{ NameSpace: Smalltalk }"

Object subclass:#VDBVirtualMemoryRegion
	instanceVariableNames:'address size protection comment'
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-Tools'
!

!VDBVirtualMemoryRegion methodsFor:'accessing'!

address
    ^ address
!

address:something
    address := something.
!

comment
    ^ comment
!

comment:something
    comment := something.
!

protection
    ^ protection
!

protection:something
    protection := something.
!

size
    ^ size
!

size:something
    size := something.
! !

!VDBVirtualMemoryRegion methodsFor:'printing & storing'!

printOn:aStream
    "append a printed representation of the receiver to the argument, aStream"

    | end |

    super printOn:aStream.
    aStream nextPut: $(.

    aStream nextPutAll: '0x'.
    address printOn: aStream base: 16 size: ExternalAddress sizeOfPointer * 2 fill: $0.
    end := address + size.
    aStream nextPutAll: ' - 0x'.
    end printOn: aStream base: 16 size: ExternalAddress sizeOfPointer * 2 fill: $0.


    aStream nextPut: $).

    "Modified: / 13-10-2017 / 12:34:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !