maat::MemStatusBitmap class

This class is used to keep track of the symbolic or concrete state of memory. Each bit represents one address (BYTE PTR). A bit set to 1 means that the value at the corresponding address is an abstract object, a bit to zero means that the value is a concrete numerical value.

Each byte in the bitmap represents a QWORD, so 8 bytes. The lower address is represented as the lowest significant bit of the bitmap byte. The higher address is represented by the highest significant bit.

        HSB           LSB
         0 0 1 0 0 0 1 1
0x107----*     *       *--- 0x100
                --- 0x104

Note: is_abstract_until() and is_concrete_until() functions take a 'max' parameter. This parameter specifies the maximum number of bytes we want to check for before returning. It is used to reduce the overhead that appears when checking a huge memory area of the same type when we want to write only a few bytes. Therefore, for performance reasons, it is possible for the functions to return an offset bigger than off+nb_bytes-1, just keep that in mind when using it.

❱   Base classes

class Serializable
Virtual interface that serializable classes must implement.

❱   Constructors, destructors, conversion operators

MemStatusBitmap()

MemStatusBitmap(offset_t nb_bytes)

~MemStatusBitmap() virtual

❱   Public functions

void extend_after(offset_t nb_bytes)

void extend_before(offset_t nb_bytes)

auto class_uid() const -> uid_t virtual
Return the class uid (see ClassId enum)

void dump(serial::Serializer&) const virtual
Dump the object contents in a serializer stream.

void load(serial::Deserializer&) virtual
Restore an object from a deserializer stream.

❱   Function documentation

maat::MemStatusBitmap::MemStatusBitmap()

Constructor

maat::MemStatusBitmap::MemStatusBitmap(offset_t nb_bytes)

Constructor

maat::MemStatusBitmap::~MemStatusBitmap() virtual

Destructor

void maat::MemStatusBitmap::extend_after(offset_t nb_bytes)

Extend the bitmap to make it represent 'nb_bytes' more bytes of memory. The new bytes are inserted at the end of the bitmap. For example if nb_bytes is 16, the actual bitmap size will be increased by 16/8 = 2 bytes

void maat::MemStatusBitmap::extend_before(offset_t nb_bytes)

Extend the bitmap to make it represent 'nb_bytes' more bytes of memory. The new bytes are inserted at the beginning of the bitmap. For example if nb_bytes is 16, the actual bitmap size will be increased by 16/8 = 2 bytes