ConOpSys V2970  P004.07
ANVILEX control operating system
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TMemoryManager Class Reference

#include <Memory_Manager.h>

Collaboration diagram for TMemoryManager:
Collaboration graph

Public Member Functions

 TMemoryManager (VOID *ParentBaseAddress, U32 MemorySize)
 
VOIDallocMemory (U32 Size, BOOL Clear)
 
VOIDrllocMemory (VOID *Pointer, U32 Size)
 
VOID dllocMemory (VOID *Pointer)
 
BOOL CheckIntegrity ()
 
VOID GetStatistics (TMemoryStatistics *Statistics)
 

Private Member Functions

BOOL Is_Segment_Valid (TAllocatedSegment *object_Segment)
 
BOOL Is_Segment_Free (TAllocatedSegment *object_Segment)
 
BOOL Is_Segment_Allocated (TAllocatedSegment *object_Segment)
 
VOID MergeSegments (TAllocatedSegment *Segment)
 
BOOL SplitSegment (TAllocatedSegment *Segment, U32 SegmentSizeToAllocation)
 
VOID SetFirstFreeSegment (TAllocatedSegment *Segment)
 

Private Attributes

VOIDBaseAddress
 
TAllocatedSegmentBottomSegment
 
TAllocatedSegmentTopSegment
 
TAllocatedSegmentFirstFreeSegment
 
U32 TotalMemorySize
 
U32 AllocatedMemorySize
 
U32 WastedMemorySize
 
U32 FreeMemorySize
 
U32 MaximalUsedMemory
 
U32 AllocatedSegments
 
U32 FreeSegments
 
U32 TotalSegments
 
U32 MaximalAllocatedSegmentSize
 
U32 MaximalFreeSegmentSize
 
U32 AllocateClearedMemoryRequests
 
U32 AllocateMemoryRequests
 
U32 DeallocateMemoryRequests
 
U32 ReallocateMemoryRequests
 
U32 AllocationErrorCount
 
U32 ReallocationErrorCount
 
U32 DeallocationErrorCount
 
TAllocatedSegmentFailedSegment
 
U32 FailedSegmentSatus
 

Constructor & Destructor Documentation

◆ TMemoryManager()

TMemoryManager::TMemoryManager ( VOID ParentBaseAddress,
U32  MemorySize 
)

Member Function Documentation

◆ allocMemory()

VOID * TMemoryManager::allocMemory ( U32  Size,
BOOL  Clear 
)

◆ CheckIntegrity()

BOOL TMemoryManager::CheckIntegrity ( )

◆ dllocMemory()

VOID TMemoryManager::dllocMemory ( VOID Pointer)

◆ GetStatistics()

VOID TMemoryManager::GetStatistics ( TMemoryStatistics Statistics)

◆ Is_Segment_Allocated()

BOOL TMemoryManager::Is_Segment_Allocated ( TAllocatedSegment object_Segment)
private

◆ Is_Segment_Free()

BOOL TMemoryManager::Is_Segment_Free ( TAllocatedSegment object_Segment)
private

◆ Is_Segment_Valid()

BOOL TMemoryManager::Is_Segment_Valid ( TAllocatedSegment object_Segment)
private

◆ MergeSegments()

VOID TMemoryManager::MergeSegments ( TAllocatedSegment Segment)
private

◆ rllocMemory()

VOID * TMemoryManager::rllocMemory ( VOID Pointer,
U32  Size 
)
Todo:
ANVILEX KM: Try to increase upper segment
Todo:
ANVILEX KM: Try to decrease upper segment

References MEMORY_MANAGER_ALLOCATED_SEGMENT, NULL, TAllocatedSegment::Size, and TAllocatedSegment::Status.

◆ SetFirstFreeSegment()

VOID TMemoryManager::SetFirstFreeSegment ( TAllocatedSegment Segment)
private

◆ SplitSegment()

BOOL TMemoryManager::SplitSegment ( TAllocatedSegment Segment,
U32  SegmentSizeToAllocation 
)
private

Member Data Documentation

◆ AllocateClearedMemoryRequests

U32 TMemoryManager::AllocateClearedMemoryRequests
private

Referenced by GetStatistics(), and TMemoryManager().

◆ AllocatedMemorySize

U32 TMemoryManager::AllocatedMemorySize
private

Referenced by GetStatistics(), and TMemoryManager().

◆ AllocatedSegments

U32 TMemoryManager::AllocatedSegments
private

Referenced by GetStatistics(), and TMemoryManager().

◆ AllocateMemoryRequests

U32 TMemoryManager::AllocateMemoryRequests
private

Referenced by GetStatistics(), and TMemoryManager().

◆ AllocationErrorCount

U32 TMemoryManager::AllocationErrorCount
private

Referenced by GetStatistics(), and TMemoryManager().

◆ BaseAddress

VOID* TMemoryManager::BaseAddress
private

Referenced by GetStatistics(), and TMemoryManager().

◆ BottomSegment

TAllocatedSegment* TMemoryManager::BottomSegment
private

◆ DeallocateMemoryRequests

U32 TMemoryManager::DeallocateMemoryRequests
private

Referenced by GetStatistics(), and TMemoryManager().

◆ DeallocationErrorCount

U32 TMemoryManager::DeallocationErrorCount
private

Referenced by GetStatistics(), and TMemoryManager().

◆ FailedSegment

TAllocatedSegment* TMemoryManager::FailedSegment
private

Referenced by GetStatistics(), and TMemoryManager().

◆ FailedSegmentSatus

U32 TMemoryManager::FailedSegmentSatus
private

Referenced by GetStatistics(), and TMemoryManager().

◆ FirstFreeSegment

TAllocatedSegment* TMemoryManager::FirstFreeSegment
private

Referenced by TMemoryManager().

◆ FreeMemorySize

U32 TMemoryManager::FreeMemorySize
private

◆ FreeSegments

U32 TMemoryManager::FreeSegments
private

◆ MaximalAllocatedSegmentSize

U32 TMemoryManager::MaximalAllocatedSegmentSize
private

Referenced by GetStatistics(), and TMemoryManager().

◆ MaximalFreeSegmentSize

U32 TMemoryManager::MaximalFreeSegmentSize
private

Referenced by GetStatistics(), and TMemoryManager().

◆ MaximalUsedMemory

U32 TMemoryManager::MaximalUsedMemory
private

Referenced by GetStatistics(), and TMemoryManager().

◆ ReallocateMemoryRequests

U32 TMemoryManager::ReallocateMemoryRequests
private

Referenced by GetStatistics(), and TMemoryManager().

◆ ReallocationErrorCount

U32 TMemoryManager::ReallocationErrorCount
private

Referenced by GetStatistics(), and TMemoryManager().

◆ TopSegment

TAllocatedSegment* TMemoryManager::TopSegment
private

Referenced by GetStatistics(), and TMemoryManager().

◆ TotalMemorySize

U32 TMemoryManager::TotalMemorySize
private

◆ TotalSegments

U32 TMemoryManager::TotalSegments
private

◆ WastedMemorySize

U32 TMemoryManager::WastedMemorySize
private

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