1 #ifndef AESALON_MONITOR_MEMORY_BLOCK_H
2 #define AESALON_MONITOR_MEMORY_BLOCK_H
9 /** A representation of a block of allocated memory. */
12 /** The address of the block. */
14 /** The size of the block. */
17 /** Generic constructor.
18 @param address The address of the block.
19 @param size The size of the block.
21 MemoryBlock(Word address
, Word size
) : address(address
), size(size
) {}
23 /** Gets the address of the current block.
24 @return The address of the block.
26 Word
get_address() const { return address
; }
27 /** Changes the address of the current block.
28 @param new_addres The new address.
30 void set_address(Word new_address
) { address
= new_address
; }
31 /** Returns the current size of the current block.
32 @return The current size.
34 Word
get_size() const { return size
; }
35 /** Changes the size of the current block.
36 @param new_size The new size.
38 void set_size(Word new_size
) { size
= new_size
; }
41 } // namespace Monitor
42 } // namespace Aesalon