Implements DefaultMemoryManager.
DefaultMemoryManager impl | Implements DefaultMemoryManager. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file DefaultMemoryManager. |
C-kern/ | Implementation file DefaultMemoryManager impl. |
mm_impl_t | |
types | |
mm_impl_it | Adapts mm_it to mm_impl_t. |
static variables | |
s_mmimpl_interface | Contains single instance of interface mm_impl_it. |
initthread | |
lifetime | |
query | |
allocate | |
test |
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.
© 2012 Jörg Seebohn
Header file DefaultMemoryManager.
Implementation file DefaultMemoryManager impl.
types | |
mm_impl_it | Adapts mm_it to mm_impl_t. |
static variables | |
s_mmimpl_interface | Contains single instance of interface mm_impl_it. |
initthread | |
lifetime | |
query | |
allocate | |
test |
mm_it_DECLARE( mm_impl_it, mm_impl_t )
Adapts mm_it to mm_impl_t. See mm_it_DECLARE.
static mm_impl_it s_mmimpl_interface
Contains single instance of interface mm_impl_it.
Adapts mm_it to mm_impl_t.
mm_it_DECLARE( mm_impl_it, mm_impl_t )
The function table describing the interface to a memory manager.
struct mm_it
Contains single instance of interface mm_impl_it.
static mm_impl_it s_mmimpl_interface
Implements mm_it.mm_it_DECLARE.
#define mm_it_DECLARE( declared_it, memorymanager_t ) typedef struct declared_it declared_it ; struct declared_it { int (* malloc) (memorymanager_t * mman, size_t size, /*out*/struct memblock_t * memblock) ; int (* mresize) (memorymanager_t * mman, size_t newsize, struct memblock_t * memblock) ; int (* mfree) (memorymanager_t * mman, struct memblock_t * memblock) ; size_t (* sizeallocated) (memorymanager_t * mman) ; } ;