| /** | |
| * @defgroup global_maloc global_maloc class | |
| * @brief Global group for maloc | |
| */ | |
| /** | |
| * @file maloc_base.h | |
| * @ingroup global_maloc | |
| * @brief The base (or foundation) header for MALOC. | |
| * @author Michael Holst | |
| * @note This header sets things up correctly for using ISO/ANSI-C. | |
| * The following macros affect the behavior of the header: | |
| @verbatim | |
| Inlining for speed: (Normal C functions if VINLINE_XXX not defined.) | |
| ------------------ | |
| -DVINLINE_VNM : Enables macro replacement of time-critical funcs in VNM. | |
| @endverbatim | |
| * | |
| * @version $Id: maloc_base.h,v 1.33 2010/08/12 05:40:16 fetk Exp $ | |
| * | |
| * @attention | |
| * @verbatim | |
| * | |
| * MALOC = < Minimal Abstraction Layer for Object-oriented C > | |
| * Copyright (C) 1994-- Michael Holst | |
| * | |
| * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Lesser General Public | |
| * License as published by the Free Software Foundation; either | |
| * version 2.1 of the License, or (at your option) any later version. | |
| * | |
| * This library 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 | |
| * Lesser General Public License for more details. | |
| * | |
| * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| * | |
| * @endverbatim | |
| */ | |
| /* | |
| * *************************************************************************** | |
| * Proper ISO-C header setup (with a slight "signals" tweek for setjmp) | |
| * *************************************************************************** | |
| */ | |
| /* Get the fifteen ISO-C headers (CAREFUL: POSIX/BSD flags delicate...) */ | |
| /* Some compilers don't set this for you; GCC does with -ansi */ | |
| /* | |
| * if !defined(__STDC__) | |
| * define __STDC__ 1 | |
| * endif | |
| */ | |
| /* Old Sparc compilers need this to give you prototypes */ | |
| /* | |
| * if !defined(__USE_FIXED_PROTOTYPES__) | |
| * define __USE_FIXED_PROTOTYPES__ | |
| * endif | |
| */ | |
| /* Include 14 of the 15 ISO-C headers (postponing setjmp.h) */ | |
| /** | |
| * @brief Fix to broken <time.h> on old SunOS | |
| */ | |
| /** | |
| * @brief Linux: uses sigsetjmp as the setjmp function | |
| * @note | |
| * @verbatim | |
| * Problems using setjmp/longjmp for use in the MC-shell. | |
| * | |
| * Problem: Some implementations of ISO-C "setjmp/longjmp" do not return | |
| * the interrupt mask to its pre-jump state after returning. | |
| * The behavior this produces is for example you can capture a | |
| * single CTRL-C, but that is it; the mask for CTRL-C is wiped | |
| * after the first interrupt is handled. | |
| * | |
| * Solution: Use the "sigsetjmp/siglongjmp" extensions provided by most | |
| * UNIX variants. You just have to set an appropriate macro | |
| * before including <setjmp.h> to get sigsetjmp rather than | |
| * setjmp behavior. | |
| * | |
| * Notes: You can run into trouble (e.g. some versions of Linux) if | |
| * you set some of these special signal macros before some of | |
| * the other ISO-C headers. Therefore, we only set the macros | |
| * just before including <setjmp.h> as the final ISO-C header. | |
| * @endverbatim | |
| */ | |
| /** | |
| * @brief IRIX: uses sigsetjmp as the setjmp function | |
| * @note | |
| * @verbatim | |
| * Problems using setjmp/longjmp for use in the MC-shell. | |
| * | |
| * Problem: Some implementations of ISO-C "setjmp/longjmp" do not return | |
| * the interrupt mask to its pre-jump state after returning. | |
| * The behavior this produces is for example you can capture a | |
| * single CTRL-C, but that is it; the mask for CTRL-C is wiped | |
| * after the first interrupt is handled. | |
| * | |
| * Solution: Use the "sigsetjmp/siglongjmp" extensions provided by most | |
| * UNIX variants. You just have to set an appropriate macro | |
| * before including <setjmp.h> to get sigsetjmp rather than | |
| * setjmp behavior. | |
| * | |
| * Notes: You can run into trouble (e.g. some versions of Linux) if | |
| * you set some of these special signal macros before some of | |
| * the other ISO-C headers. Therefore, we only set the macros | |
| * just before including <setjmp.h> as the final ISO-C header. | |
| * @endverbatim | |
| */ | |
| /* Now finally include the 15th header, setjmp.h */ | |
| /** @brief Setup so this include file (and subsequent) will work for both C and C++ */ | |
| /** @brief Setup so this include file (and subsequent) will work for both C and C++ */ | |
| /** @brief Setup so this include file (and subsequent) will work for both C and C++ */ | |
| /** @brief Setup so this include file (and subsequent) will work for both C and C++ */ | |
| /* | |
| * *************************************************************************** | |
| * Private and Public type modifier simulation | |
| * *************************************************************************** | |
| */ | |
| /** @brief Slick assertion macro */ | |
| /** @brief Slick assertion macro */ | |
| /** @brief Slick assertion macro */ | |
| /** @brief Slick assertion macro */ | |
| /** @brief Slick assertion macro */ | |
| /** @brief Slick assertion macro */ | |
| /** @brief A userful error handling macro */ | |
| /** @brief A userful error handling macro */ | |
| /** @brief A userful error handling macro */ | |
| /** @brief A userful error handling macro */ | |
| /** @brief A userful error handling macro */ | |
| /** @brief A userful error handling macro */ | |
| /** @brief A userful error handling macro */ | |
| /** @brief A userful error handling macro */ | |
| /** @brief A userful error handling macro */ | |
| /** @brief A userful error handling macro */ | |
| /* | |
| * *************************************************************************** | |
| * Global constants | |
| * *************************************************************************** | |
| */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant. 1e9 just fits into 32-bit signed int */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /* | |
| * #define VMAX_OBJECTS 16777216 //(1<<24) = 2^24 | |
| * #define VBLOCK_POWER 12 | |
| */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Global constant */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** @brief Mathematical macro */ | |
| /** | |
| * @brief Inlining via macros for speed | |
| */ | |