Sierra Toolkit Version of the Day
MallocUsed.h
00001 /*------------------------------------------------------------------------*/
00002 /*                 Copyright 2011 Sandia Corporation.                     */
00003 /*  Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive   */
00004 /*  license for use of this work by or on behalf of the U.S. Government.  */
00005 /*  Export of this program may require a license from the                 */
00006 /*  United States Government.                                             */
00007 /*------------------------------------------------------------------------*/
00008 
00009 #ifndef STK_UTIL_UTIL_MALLOCUSED_H
00010 #define STK_UTIL_UTIL_MALLOCUSED_H
00011 
00012 #include <stdlib.h>
00013 
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017 
00018 #if defined SIERRA_PTMALLOC3_ALLOCATOR || defined SIERRA_PTMALLOC2_ALLOCATOR
00019 size_t malloc_used();
00020 size_t malloc_footprint();
00021 size_t malloc_max_footprint();
00022 #else
00023 inline size_t malloc_used() {
00024   return 0;
00025 }
00026 inline size_t malloc_footprint() {
00027   return 0;
00028 }
00029 inline size_t malloc_max_footprint() {
00030   return 0;
00031 }
00032 #endif
00033 
00034 #ifdef __cplusplus
00035 } /* extern "C" */
00036 #endif
00037 
00038 #endif /* STK_UTIL_UTIL_MALLOCUSED_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends