The Pedigree Project 0.1
Classes | Public Member Functions | Private Attributes | List of all members
AllocationCommand Class Reference

#include <AllocationCommand.h>

+ Inheritance diagram for AllocationCommand:
+ Collaboration diagram for AllocationCommand:

Classes

struct  Allocation
 

Public Member Functions

 AllocationCommand ()
 
 ~AllocationCommand ()
 
void autocomplete (const HugeStaticString &input, HugeStaticString &output)
 
bool execute (const HugeStaticString &input, HugeStaticString &output, InterruptState &state, DebuggerIO *screen)
 
const NormalStaticString getString ()
 
void allocatePage (physical_uintptr_t page)
 
void freePage (physical_uintptr_t page)
 
void postProcess ()
 
bool isMallocing ()
 
void setMallocing (bool b)
 
void checkpoint ()
 
virtual const char * getLine1 (size_t index, DebuggerIO::Colour &colour, DebuggerIO::Colour &bgColour)
 
virtual const char * getLine2 (size_t index, size_t &colOffset, DebuggerIO::Colour &colour, DebuggerIO::Colour &bgColour)
 
virtual size_t getLineCount ()
 
- Public Member Functions inherited from Scrollable
void move (size_t x, size_t y)
 
void resize (size_t width, size_t height)
 
void scroll (ssize_t lines)
 
void scrollTo (size_t absolute)
 
void scrollHorizontal (ssize_t columns)
 
void horizontalScrollTo (size_t absolute)
 
void refresh (DebuggerIO *pScreen)
 
void setScrollKeys (char up, char down)
 
ssize_t getLine ()
 
void centreOn (size_t line)
 
size_t height () const
 
size_t width () const
 
virtual size_t getContentWidth ()
 

Private Attributes

Vector< Allocation * > m_Allocations
 
Vector< void * > m_Frees
 
size_t m_nLines
 
Tree< size_t, Allocation * > m_Tree
 
Tree< size_t, Allocation * >::Iterator m_It
 
size_t m_nIdx
 
bool m_bAllocating
 

Additional Inherited Members

- Protected Attributes inherited from Scrollable
size_t m_x
 
size_t m_y
 
size_t m_width
 
size_t m_height
 
ssize_t m_line
 
size_t m_column
 
char m_ScrollUp
 
char m_ScrollDown
 

Detailed Description

Traces page allocations.

Definition at line 40 of file AllocationCommand.h.

Constructor & Destructor Documentation

◆ AllocationCommand()

AllocationCommand::AllocationCommand ( )

Default constructor - zeroes stuff.

Definition at line 35 of file AllocationCommand.cc.

◆ ~AllocationCommand()

AllocationCommand::~AllocationCommand ( )

Default destructor - does nothing.

Definition at line 46 of file AllocationCommand.cc.

Member Function Documentation

◆ allocatePage()

void AllocationCommand::allocatePage ( physical_uintptr_t  page)

Definition at line 208 of file AllocationCommand.cc.

◆ autocomplete()

void AllocationCommand::autocomplete ( const HugeStaticString &  input,
HugeStaticString &  output 
)
virtual

Return an autocomplete string, given an input string.

Implements DebuggerCommand.

Definition at line 48 of file AllocationCommand.cc.

◆ checkpoint()

void AllocationCommand::checkpoint ( )

Definition at line 253 of file AllocationCommand.cc.

◆ execute()

bool AllocationCommand::execute ( const HugeStaticString &  input,
HugeStaticString &  output,
InterruptState &  state,
DebuggerIO *  screen 
)
virtual

Execute the command with the given screen.

Implements DebuggerCommand.

Definition at line 50 of file AllocationCommand.cc.

References DebuggerIO::drawHorizontalLine(), DebuggerIO::drawString(), DebuggerIO::enableCli(), DebuggerIO::getChar(), and DebuggerIO::getWidth().

◆ freePage()

void AllocationCommand::freePage ( physical_uintptr_t  page)

Definition at line 228 of file AllocationCommand.cc.

◆ getLine1()

const char * AllocationCommand::getLine1 ( size_t  index,
DebuggerIO::Colour &  colour,
DebuggerIO::Colour &  bgColour 
)
virtual

Implements Scrollable.

Definition at line 156 of file AllocationCommand.cc.

◆ getLine2()

const char * AllocationCommand::getLine2 ( size_t  index,
size_t &  colOffset,
DebuggerIO::Colour &  colour,
DebuggerIO::Colour &  bgColour 
)
virtual

Implements Scrollable.

Definition at line 196 of file AllocationCommand.cc.

◆ getLineCount()

size_t AllocationCommand::getLineCount ( )
virtual

Implements Scrollable.

Definition at line 204 of file AllocationCommand.cc.

◆ getString()

const NormalStaticString AllocationCommand::getString ( )
inlinevirtual

Returns the string representation of this command.

Implements DebuggerCommand.

Definition at line 66 of file AllocationCommand.h.

◆ isMallocing()

bool AllocationCommand::isMallocing ( )
inline

Definition at line 74 of file AllocationCommand.h.

◆ postProcess()

void AllocationCommand::postProcess ( )

Definition at line 232 of file AllocationCommand.cc.

◆ setMallocing()

void AllocationCommand::setMallocing ( bool  b)
inline

Definition at line 77 of file AllocationCommand.h.

Member Data Documentation

◆ m_Allocations

Vector<Allocation*> AllocationCommand::m_Allocations
private

Definition at line 99 of file AllocationCommand.h.

◆ m_bAllocating

bool AllocationCommand::m_bAllocating
private

Definition at line 105 of file AllocationCommand.h.

◆ m_Frees

Vector<void*> AllocationCommand::m_Frees
private

Definition at line 100 of file AllocationCommand.h.

◆ m_It

Tree<size_t,Allocation*>::Iterator AllocationCommand::m_It
private

Definition at line 103 of file AllocationCommand.h.

◆ m_nIdx

size_t AllocationCommand::m_nIdx
private

Definition at line 104 of file AllocationCommand.h.

◆ m_nLines

size_t AllocationCommand::m_nLines
private

Definition at line 101 of file AllocationCommand.h.

◆ m_Tree

Tree<size_t, Allocation*> AllocationCommand::m_Tree
private

Definition at line 102 of file AllocationCommand.h.


The documentation for this class was generated from the following files: