MLib Alpha 1 API Reference

MLib Alpha 1 API Reference

Configuration

This section contains the list of all configuration macros that are used at build time to determine which features are turned "on" or "off" in the MLib.

All configuration macros are placed in the public header file named "mlib/config/options.h"


M_CONFIG_OPTION_MEMORY_POOL


#define  M_CONFIG_OPTION_MEMORY_POOLS

define this macro when you want to use fast memory pools to allocate and release certain common items like list nodes, hash nodes, etc..

undefine it to only use normal memory allocations. This is useful when performing debugging with malloc debugging tools (Electric Fence, DMalloc, Purify, Insure++, CodeGuard, etc..)



M_DEBUG_LEVEL_ERROR


#undef   M_DEBUG_LEVEL_ERROR

define this macro when you want to generate code for the ?M_ERROR macros. They're used to log a serious error within the library (without halting the application).

?note; the ?M_ERROR macros will be compiled anyway if the M_DEBUG_LEVEL_LOG macro is defined



M_DEBUG_LEVEL_LOG


#define  M_DEBUG_LEVEL_LOG

define this macro when you want to generate code for the ?M_LOG macro and its variants (@M_LOG0, ?M_LOG1, etc..). They're used to log normal operations of the library with various priorities during execution



M_DEBUG_COMPILE_ASSERTS


#define  M_DEBUG_COMPILE_ASSERTS

define this macro when you want to generate code for m_assert and its variants.



M_DEBUG_COMPILE_PRECHEKS


#define  M_DEBUG_COMPILE_PRECHEKS

define this macro when you want to compile pre-condition checks. (using the m_precheck and m_precheck_val macros), even when all of M_DEBUG_COMPILE_ASSERTS , M_DEBUG_LEVEL_ERROR and M_DEBUG_LEVEL_LOG are undefined..



M_CONFIG_THREAD_SAFE


#define  M_CONFIG_THREAD_SAFE

this macro should be defined when compiling a thread-safe version of the MLib.



generated on Tue Oct 09 23:59:46 2001