Exports convenience macros for accessing mm_maincontext.
MemoryManagerMacros | Exports convenience macros for accessing mm_maincontext. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file MemoryManagerMacros. |
Functions | |
query | |
SIZEALLOCATED_MM | REturns number of allocated bytes. |
allocate | |
ALLOC_MM | Allocates a new memory block. |
RESIZE_MM | Resizes memory block. |
FREE_MM | Frees memory block. |
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 MemoryManagerMacros.
Inline implementation of maincontext_t.mm_maincontext.
#define mm_maincontext( ) (tcontext_maincontext()->mm)
REturns number of allocated bytes.
#define SIZEALLOCATED_MM( ) sizeallocated_mm(mm_maincontext())
Allocates a new memory block.
#define ALLOC_MM( size, mblock ) malloc_mm(mm_maincontext(), size, mblock)
Resizes memory block.
#define RESIZE_MM( newsize, mblock ) mresize_mm(mm_maincontext(), newsize, mblock)
Frees memory block.
#define FREE_MM( mblock ) mfree_mm(mm_maincontext(), mblock)