📄 config.h
字号:
#endif /* MP_PRELOAD_LIBS */#ifndef MP_PRELOADMT_LIBS#define MP_PRELOADMT_LIBS MP_MPATROLMT_LIBS MP_SYMBOL_LIBS MP_THREADS_LIBS \ MP_SYSTEM_LIBS#endif /* MP_PRELOADMT_LIBS */#endif /* MP_PRELOAD_SUPPORT *//* Indicates if support for Parasoft Inuse is enabled. This is a commercial * product which graphically displays process memory usage and is provided as * an add-on for Parasoft Insure++. */#ifndef MP_INUSE_SUPPORT#define MP_INUSE_SUPPORT 0#endif /* MP_INUSE_SUPPORT *//* Indicates if the mptrace tool should be built with support for a graphical * user interface. This is currently only available on UNIX systems running * X that have the Motif or LessTif libraries. */#ifndef MP_GUI_SUPPORT#if defined(HAVE_CONFIG_H) && !defined(X_DISPLAY_MISSING)#define MP_GUI_SUPPORT 1#else /* HAVE_CONFIG_H && X_DISPLAY_MISSING */#define MP_GUI_SUPPORT 0#endif /* HAVE_CONFIG_H && X_DISPLAY_MISSING */#endif /* MP_GUI_SUPPORT *//* Indicates if the C functions defined in malloc.c are to have duplicate * functions defined with an alternative name. */#ifndef MP_ALTFUNCNAMES#if TARGET == TARGET_UNIX#define MP_ALTFUNCNAMES 1#else /* TARGET */#define MP_ALTFUNCNAMES 0#endif /* TARGET */#endif /* MP_ALTFUNCNAMES *//* The macro function which will be used to calculate the alternative names * for all C functions that are defined in malloc.c. */#if MP_ALTFUNCNAMES#ifndef MP_ALTFUNCNAME#define MP_ALTFUNCNAME(f) _ ## f#endif /* MP_ALTFUNCNAME */#endif /* MP_ALTFUNCNAMES *//* Indicates if the system supports .init and .fini sections for placing * calls to routines that will be called before main() and after exit(). * This is only likely to be true for ELF systems. */#ifndef MP_INIT_SUPPORT#if SYSTEM == SYSTEM_DGUX || SYSTEM == SYSTEM_DRSNX || \ SYSTEM == SYSTEM_DYNIX || SYSTEM == SYSTEM_LINUX || \ SYSTEM == SYSTEM_SOLARIS || SYSTEM == SYSTEM_UNIXWARE#define MP_INIT_SUPPORT 1#elif SYSTEM == SYSTEM_FREEBSD || SYSTEM == SYSTEM_NETBSD || \ SYSTEM == SYSTEM_OPENBSD || SYSTEM == SYSTEM_SUNOS#ifdef __ELF__#define MP_INIT_SUPPORT 1#else /* __ELF__ */#define MP_INIT_SUPPORT 0#endif /* __ELF__ */#else /* SYSTEM */#define MP_INIT_SUPPORT 0#endif /* SYSTEM */#endif /* MP_INIT_SUPPORT *//* Indicates if the mpatrol library can assume that any functions whose names * begin with __mp_init_* when the symbols are being read should be called * when __mp_init() is called. This also applies to functions whose names * begin with __mp_fini_*, in which case they will be called when __mp_fini() * is called. This should not be enabled on systems where the address of the * symbol in the object file does not represent the entry point for the * resulting function and will obviously not work if the symbol has been * stripped from the executable or shared library at any point. */#ifndef MP_INITFUNC_SUPPORT#if TARGET == TARGET_AMIGA || TARGET == TARGET_NETWARE || \ ((SYSTEM == SYSTEM_AIX || SYSTEM == SYSTEM_LYNXOS) && \ (ARCH == ARCH_POWER || ARCH == ARCH_POWERPC))#define MP_INITFUNC_SUPPORT 0#else /* TARGET && SYSTEM && ARCH */#define MP_INITFUNC_SUPPORT 1#endif /* TARGET && SYSTEM && ARCH */#endif /* MP_INITFUNC_SUPPORT *//* Indicates if the __mp_fini() function should be registered with atexit() in * order to terminate the mpatrol library. This is disabled by default on * systems that support .init and .fini sections, or if the compiler is the GNU * compiler or a C++ compiler since there are better ways to terminate the * library in these cases. However, if there are problems with the mpatrol * library not being terminated at the correct point in a program's execution * then try using atexit() instead. */#ifndef MP_USE_ATEXIT#if MP_INIT_SUPPORT || SYSTEM == SYSTEM_TRU64 || defined(__GNUC__) || \ defined(__cplusplus)#define MP_USE_ATEXIT 0#else /* MP_INIT_SUPPORT && SYSTEM && __GNUC__ && __cplusplus */#define MP_USE_ATEXIT 1#endif /* MP_INIT_SUPPORT && SYSTEM && __GNUC__ && __cplusplus */#endif /* MP_USE_ATEXIT *//* Indicates if the compiler supports the ident preprocessor directive for * placing a version string in the comment section of an object file. This * is only likely to be true for ELF systems. */#ifndef MP_IDENT_SUPPORT#if SYSTEM == SYSTEM_CYGWIN || SYSTEM == SYSTEM_DGUX || \ SYSTEM == SYSTEM_DRSNX || SYSTEM == SYSTEM_DYNIX || \ SYSTEM == SYSTEM_IRIX || SYSTEM == SYSTEM_LINUX || \ SYSTEM == SYSTEM_SINIX || SYSTEM == SYSTEM_SOLARIS || \ SYSTEM == SYSTEM_TRU64 || SYSTEM == SYSTEM_UNIXWARE#define MP_IDENT_SUPPORT 1#elif SYSTEM == SYSTEM_FREEBSD || SYSTEM == SYSTEM_NETBSD || \ SYSTEM == SYSTEM_OPENBSD || SYSTEM == SYSTEM_SUNOS#ifdef __ELF__#define MP_IDENT_SUPPORT 1#else /* __ELF__ */#define MP_IDENT_SUPPORT 0#endif /* __ELF__ */#else /* SYSTEM */#define MP_IDENT_SUPPORT 0#endif /* SYSTEM */#endif /* MP_IDENT_SUPPORT *//* Indicates if the compiler supports the long long type. This is only used * to determine the minimum alignment required for a generic memory allocation. */#ifndef MP_LONGLONG_SUPPORT#if ENVIRON == ENVIRON_64 || defined(__GNUC__)#define MP_LONGLONG_SUPPORT 1#else /* ENVIRON && __GNUC__ */#define MP_LONGLONG_SUPPORT 0#endif /* ENVIRON && __GNUC__ */#endif /* MP_LONGLONG_SUPPORT *//* The format string passed to fprintf() which is used to display addresses. */#ifndef MP_POINTER#if ENVIRON == ENVIRON_64#define MP_POINTER "0x%016lX"#else /* ENVIRON */#define MP_POINTER "0x%08lX"#endif /* ENVIRON */#endif /* MP_POINTER *//* The name of the command used to invoke a text editor on a source file. */#ifndef MP_EDITOR#define MP_EDITOR "mpedit"#endif /* MP_EDITOR *//* The name of the environment variable which contains library options. */#ifndef MP_OPTIONS#define MP_OPTIONS "MPATROL_OPTIONS"#endif /* MP_OPTIONS *//* The name of the log file used to send library diagnostics to. This may * be overridden at run-time using the LOGFILE option and may contain * special formatting characters. It may also be affected by the environment * variable specified in MP_LOGDIR. */#ifndef MP_LOGFILE#define MP_LOGFILE "mpatrol.log"#endif /* MP_LOGFILE *//* The name of the environment variable used to specify a directory into which * all mpatrol log files should be written. The directory specified must * actually exist. */#ifndef MP_LOGDIR#define MP_LOGDIR "LOGDIR"#endif /* MP_LOGDIR *//* The name of the file used to send memory allocation profiling information * to. This may be overridden at run-time using the PROFFILE option and may * contain special formatting characters. It may also be affected by the * environment variable specified in MP_PROFDIR. */#ifndef MP_PROFFILE#define MP_PROFFILE "mpatrol.out"#endif /* MP_PROFFILE *//* The name of the environment variable used to specify a directory into which * all mpatrol profiling output files should be written. The directory * specified must actually exist. */#ifndef MP_PROFDIR#define MP_PROFDIR "PROFDIR"#endif /* MP_PROFDIR *//* The name of the file used to send memory allocation tracing information * to. This may be overridden at run-time using the TRACEFILE option and may * contain special formatting characters. It may also be affected by the * environment variable specified in MP_TRACEDIR. */#ifndef MP_TRACEFILE#define MP_TRACEFILE "mpatrol.trace"#endif /* MP_TRACEFILE *//* The name of the environment variable used to specify a directory into which * all mpatrol tracing output files should be written. The directory * specified must actually exist. */#ifndef MP_TRACEDIR#define MP_TRACEDIR "TRACEDIR"#endif /* MP_TRACEDIR *//* The magic sequence of bytes to use at the beginning and end of every * profiling output file for verification purposes. This must be exactly * four bytes in length and will be truncated if it is greater than that. */#ifndef MP_PROFMAGIC#define MP_PROFMAGIC "MPTL"#endif /* MP_PROFMAGIC *//* The magic sequence of bytes to use at the beginning and end of every * tracing output file for verification purposes. This must be exactly * four bytes in length and will be truncated if it is greater than that. */#ifndef MP_TRACEMAGIC#define MP_TRACEMAGIC "MTRC"#endif /* MP_TRACEMAGIC *//* The default prefix string to use when calculating the filename of each * allocation contents file. */#ifndef MP_CONTENTSFILE#define MP_CONTENTSFILE ".mpatrol"#endif /* MP_CONTENTSFILE *//* The prefix string to print at the start of each line in the mpatrol log * file when writing user data with __mp_printf(). */#ifndef MP_PRINTPREFIX#define MP_PRINTPREFIX "> "#endif /* MP_PRINTPREFIX *//* The overflow buffer size in bytes. This may be overridden at run-time * using the OFLOWSIZE option. The default is zero since this setting * may dramatically increase execution time if it is non-zero. */#ifndef MP_OVERFLOW#define MP_OVERFLOW 0#endif /* MP_OVERFLOW *//* The overflow byte value. This may be overridden at run-time using the * OFLOWBYTE option. The default is the bit pattern 0b10101010. */#ifndef MP_OVERBYTE#define MP_OVERBYTE 0xAA#endif /* MP_OVERBYTE *//* The allocation byte value. This may be overridden at run-time using the * ALLOCBYTE option. The default is the bit pattern 0b11111111. */#ifndef MP_ALLOCBYTE#define MP_ALLOCBYTE 0xFF#endif /* MP_ALLOCBYTE *//* The free byte value. This may be overridden at run-time using the * FREEBYTE option. The default is the bit pattern 0b01010101. */#ifndef MP_FREEBYTE#define MP_FREEBYTE 0x55#endif /* MP_FREEBYTE *//* The number of bytes that distinguish where medium-sized allocations * begin and small-sized allocations end for profiling purposes. This * may be overridden at run-time using the SMALLBOUND option. */#ifndef MP_SMALLBOUND#define MP_SMALLBOUND 32#endif /* MP_SMALLBOUND *//* The number of bytes that distinguish where large-sized allocations * begin and medium-sized allocations end for profiling purposes. This * may be overridden at run-time using the MEDIUMBOUND option. */#ifndef MP_MEDIUMBOUND#define MP_MEDIUMBOUND 256#endif /* MP_MEDIUMBOUND *//* The number of bytes that distinguish where extra large-sized allocations * begin and large-sized allocations end for profiling purposes. This * may be overridden at run-time using the LARGEBOUND option. */#ifndef MP_LARGEBOUND#define MP_LARGEBOUND 2048#endif /* MP_LARGEBOUND *//* Ensure that the small allocation boundary is less than the medium * allocation boundary and the medium allocation boundary is less than the * large allocation boundary. */#if MP_SMALLBOUND >= MP_MEDIUMBOUND || MP_MEDIUMBOUND >= MP_LARGEBOUND#error allocation boundary overlap#endif#endif /* MP_CONFIG_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -