Choco OS
V.0.16.9.0
Join to the chocolate world
|
The file with memory manager interface. More...
Go to the source code of this file.
Data Structures | |
struct | oC_MemMan_AllocatorsStats_t |
struct | oC_MemMan_AllocationStats_t |
Typedefs | |
typedef void(* | oC_MemMan_DumpFunction_t) (oC_UInt_t Data) |
stores pointer to function for dumping data | |
Functions | |
oC_ErrorCode_t | oC_MemMan_TurnOn (void) |
turns on memory manager More... | |
oC_ErrorCode_t | oC_MemMan_TurnOff (void) |
turns off the module More... | |
void | oC_MemMan_CheckOverflow (void) |
scan each block to check if the overflow event not occurs. More... | |
void | oC_MemMan_CheckMemoryExhausted (void) |
checks if memory exhausted event not occurs. More... | |
void | oC_MemMan_CheckMemoryLeak (void) |
checks if memory is not leaking More... | |
oC_ErrorCode_t | oC_MemMan_TestAndRepairMainHeap (oC_MemMan_DumpFunction_t DumpFunction) |
diagnoses main heap More... | |
oC_HeapMap_t | oC_MemMan_AllocateHeapMap (oC_UInt_t Size, Allocator_t Allocator, const char *Function, uint32_t LineNumber, AllocationFlags_t Flags) |
allocates memory for new heap map More... | |
bool | oC_MemMan_FreeHeapMap (oC_HeapMap_t *MapPointer, AllocationFlags_t Flags) |
release heap map More... | |
void * | oC_MemMan_RawAllocate (oC_HeapMap_t Map, oC_UInt_t Size, const char *Function, uint32_t LineNumber, AllocationFlags_t Flags) |
allow to allocate memory in heap map More... | |
bool | oC_MemMan_RawFree (oC_HeapMap_t Map, void *Address, oC_UInt_t Size) |
release memory in heap map More... | |
void * | oC_MemMan_Allocate (oC_UInt_t Size, Allocator_t Allocator, const char *Function, uint32_t LineNumber, AllocationFlags_t Flags, oC_UInt_t Alignment) |
allocates memory on heap More... | |
bool | oC_MemMan_Free (void *Address, AllocationFlags_t Flags) |
release allocated memory More... | |
bool | oC_MemMan_FreeAllMemoryOfAllocator (Allocator_t Allocator) |
release all memory of allocator More... | |
oC_ErrorCode_t | oC_MemMan_SetEventHandler (MemoryEventHandler_t EventHandler) |
sets event handler function More... | |
Allocator_t | oC_MemMan_GetAllocatorOfAddress (const void *Address) |
returns allocator of address More... | |
oC_UInt_t | oC_MemMan_GetSizeOfAllocation (const void *Address) |
returns size of allocation More... | |
void * | oC_MemMan_AlignAddress (const void *Address) |
returns address aligned to the machine alignment. More... | |
void * | oC_MemMan_AlignAddressTo (const void *Address, oC_UInt_t Alignment) |
returns address aligned to the given alignment. More... | |
bool | oC_MemMan_IsAddressAligned (const void *Address) |
checks if address is aligned More... | |
bool | oC_MemMan_IsAddressAlignedTo (const void *Address, oC_UInt_t Alignment) |
checks if address is aligned to given alignment More... | |
oC_UInt_t | oC_MemMan_AlignSize (oC_UInt_t Size) |
returns size aligned to the machine alignment More... | |
oC_UInt_t | oC_MemMan_AlignSizeTo (oC_UInt_t Size, oC_UInt_t Alignment) |
returns size aligned to the given alignment More... | |
bool | oC_MemMan_IsSizeAligned (oC_UInt_t Size) |
checks if a size is aligned More... | |
oC_UInt_t | oC_MemMan_GetMaximumAllocationSize (void) |
returns maximum size of allocation More... | |
oC_UInt_t | oC_MemMan_GetFlashSize (void) |
returns size of the machine flash More... | |
oC_UInt_t | oC_MemMan_GetRamSize (void) |
returns size of the machine ram More... | |
oC_UInt_t | oC_MemMan_GetFreeFlashSize (void) |
returns size of the machine not used flash More... | |
oC_UInt_t | oC_MemMan_GetFreeRamSize (void) |
returns size of free ram More... | |
oC_UInt_t | oC_MemMan_GetExternalHeapSize (void) |
returns size of external ram More... | |
oC_UInt_t | oC_MemMan_GetDmaRamHeapSize (void) |
returns size of external ram More... | |
oC_UInt_t | oC_MemMan_GetMemoryOfAllocatorSize (Allocator_t Allocator) |
returns size of allocations per allocator More... | |
oC_UInt_t | oC_MemMan_GetAllocationBlockSize (void) |
returns size of block needed for allocation More... | |
oC_UInt_t | oC_MemMan_GetHeapMapSize (oC_HeapMap_t Map) |
returns size of heap map More... | |
oC_UInt_t | oC_MemMan_GetFreeHeapMapSize (oC_HeapMap_t Map) |
returns size of free memory in heap map More... | |
bool | oC_MemMan_IsFlashAddress (const void *Address) |
checks if address is placed in the flash section | |
bool | oC_MemMan_IsUsedFlashAddress (const void *Address) |
checks if address is in used flash section | |
bool | oC_MemMan_IsRamAddress (const void *Address) |
checks if address is in ram section | |
bool | oC_MemMan_IsDynamicAllocatedAddress (const void *Address) |
checks if address is in dynamic allocated section | |
bool | oC_MemMan_IsStaticRamAddress (const void *Address) |
checks if address is in static used ram section (data section) | |
bool | oC_MemMan_IsAddressCorrect (const void *Address) |
checks if address is correct - in RAM or in FLASH | |
bool | oC_MemMan_IsAllocatorCorrect (Allocator_t Allocator) |
checks if allocator is correct | |
oC_ErrorCode_t | oC_MemMan_ReadAllocatorsStats (oC_MemMan_AllocatorsStats_t *outAllocatorsArray, oC_UInt_t *Size) |
Reads allocators statistics array. More... | |
oC_ErrorCode_t | oC_MemMan_ReadAllocationsStats (Allocator_t Allocator, oC_MemMan_AllocationStats_t *outAllocationsArray, oC_UInt_t *Size, bool JoinSimilar) |
Reads allocations statistics of the allocator. More... | |
bool | oC_MemMan_FindOverflowedAllocation (Allocator_t Allocator, oC_MemMan_AllocationStats_t *outAllocationStat) |
searches for a overflowed buffer More... | |
oC_ErrorCode_t | oC_MemMan_ConfigureExternalHeapMap (void *StartAddress, oC_UInt_t Size) |
prepares HeapMap stored in external RAM More... | |
oC_ErrorCode_t | oC_MemMan_UnconfigureExternalHeapMap (void) |
unconfigures external heap More... | |
float | oC_MemMan_GetMemoryExhaustedLimit (void) |
float | oC_MemMan_GetPanicMemoryExhaustedLimit (void) |
oC_ErrorCode_t | oC_MemMan_SetMemoryExhaustedLimit (float LimitPercent) |
oC_ErrorCode_t | oC_MemMan_SetPanicMemoryExhaustedLimit (float LimitPercent) |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file oc_memman.h.