ScummVM API documentation
Sci::DynMem Struct Reference
Inheritance diagram for Sci::DynMem:
Sci::SegmentObj Common::Serializable

Public Member Functions

bool isValidOffset (uint32 offset) const override
 
SegmentRef dereference (reg_t pointer) override
 
reg_t findCanonicAddress (SegManager *segMan, reg_t addr) const override
 
Common::Array< reg_tlistAllDeallocatable (SegmentId segId) const override
 
void saveLoadWithSerializer (Common::Serializer &ser) override
 
- Public Member Functions inherited from Sci::SegmentObj
 SegmentObj (SegmentType type)
 
SegmentType getType () const
 
virtual void freeAtAddress (SegManager *segMan, reg_t sub_addr)
 
virtual Common::Array< reg_tlistAllOutgoingReferences (reg_t object) const
 

Public Attributes

uint _size
 
Common::String _description
 
byte * _buf
 
- Public Attributes inherited from Sci::SegmentObj
SegmentType _type
 

Additional Inherited Members

- Static Public Member Functions inherited from Sci::SegmentObj
static SegmentObjcreateSegmentObj (SegmentType type)
 

Member Function Documentation

◆ isValidOffset()

bool Sci::DynMem::isValidOffset ( uint32  offset) const
inlineoverridevirtual

Check whether the given offset into this memory object is valid, i.e., suitable for passing to dereference.

Implements Sci::SegmentObj.

◆ dereference()

SegmentRef Sci::DynMem::dereference ( reg_t  pointer)
overridevirtual

Dereferences a raw memory pointer.

Parameters
regreference to dereference
Returns
the data block referenced

Reimplemented from Sci::SegmentObj.

◆ findCanonicAddress()

reg_t Sci::DynMem::findCanonicAddress ( SegManager segMan,
reg_t  sub_addr 
) const
inlineoverridevirtual

Finds the canonic address associated with sub_reg. Used by the garbage collector.

For each valid address a, there exists a canonic address c(a) such that c(a) = c(c(a)). This address "governs" a in the sense that deallocating c(a) will deallocate a.

Parameters
sub_addrbase address whose canonic address is to be found

Reimplemented from Sci::SegmentObj.

◆ listAllDeallocatable()

Common::Array<reg_t> Sci::DynMem::listAllDeallocatable ( SegmentId  segId) const
inlineoverridevirtual

Iterates over and reports all addresses within the segment. Used by the garbage collector.

Returns
a list of addresses within the segment

Reimplemented from Sci::SegmentObj.


The documentation for this struct was generated from the following file: