Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# oscl_mem_inst.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    00003
    00004 //                     O S C L _ M E M _ I N S T . H
    00005
    00006 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    00007
    00018 #ifndef OSCL_MEM_INST_H_INCLUDED
    00019 #define OSCL_MEM_INST_H_INCLUDED
    00020
    00021 #ifndef OSCLCONFIG_MEMORY_H_INCLUDED
    00022 #include "osclconfig_memory.h"
    00023 #endif
    00024
    00025 /*
    00026 ** PVMEM_INST_LEVEL controls the instrumentation level for
    00027 ** memory leak tracking.  Detailed memory leak information (file
    00028 ** and line # of each allocation) is compiled in or out depending
    00029 ** on the level.  This information is an aid to debugging memory leaks,
    00030 ** but compiling it in will increase code size and run-time overhead.
    00031 **
    00032 ** Values are as follows
    00033 **   PVMEM_INST_LEVEL 0 -- detailed memory leak reporting information
    00034 **      is compiled out.
    00035 **   PVMEM_INST_LEVEL 1 -- detailed memory leak reporting information
    00036 **      is compiled in.
    00037 **
    00038 ** The value can be defined in the osclconfig_memory.h file for the platform.
    00039 ** In case PVMEM_INST_LEVEL is not defined for the platform, default
    00040 ** values are defined here.
    00041 */
    00042 #ifndef PVMEM_INST_LEVEL
    00043 #if (OSCL_RELEASE_BUILD)
    00044 /* release mode-- no instrumentation */
    00045 #define PVMEM_INST_LEVEL 0
    00046 #else
    00047 /* debug mode-- full instrumentation */
    00048 #define PVMEM_INST_LEVEL 1
    00049 #endif
    00050 #endif
    00051
    00052 /*
    00053 ** When bypassing the Oscl memory manager, instrumentation
    00054 ** is not needed, so should always be compiled out.
    00055 */
    00056 #if(OSCL_BYPASS_MEMMGT)
    00057 #undef PVMEM_INST_LEVEL
    00058 #define PVMEM_INST_LEVEL 0
    00059 #endif
    00060
    00061
    00064 #endif