Copyright

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.

Author

© 2012 Jörg Seebohn

Files

C-kern/api/memory/mm/mm_impl.h

C-kern/memory/mm/mm_impl.c

Implementation file DefaultMemoryManager impl.

types

mm_impl_it

mm_it_DECLARE(mm_impl_it,
mm_impl_t)

Adapts mm_it to mm_impl_t.  See mm_it_DECLARE.

static variables

s_mmimpl_interface

static mm_impl_it s_mmimpl_interface

Contains single instance of interface mm_impl_it.

initthread

lifetime

query

allocate

test

Default implementation of mm_it.
Implements DefaultMemoryManager.
mm_it_DECLARE(mm_impl_it,
mm_impl_t)
Adapts mm_it to mm_impl_t.
struct mm_it
The function table describing the interface to a memory manager.
static mm_impl_it s_mmimpl_interface
Contains single instance of interface mm_impl_it.
#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) ; } ;
Implements mm_it.mm_it_DECLARE.
Close