SURFEX v8.1
General documentation of Surfex
get_tcmalloc_info.c
Go to the documentation of this file.
1 #ifdef _CRAYC
2 /* Wrappers to obtain information from tcmalloc
3  Peter Towers - June 2014 */
4 
5 #include "malloc_extension_c.h"
6 #include <stdio.h>
7 
9 {
10 size_t value;
11 MallocExtension_GetNumericProperty("generic.heap_size", &value);
12 return value;
13 }
14 
16 {
17 size_t value;
18 MallocExtension_GetNumericProperty("generic.current_allocated_bytes", &value);
19 return value;
20 }
21 
23 {
24 size_t value;
25 MallocExtension_GetNumericProperty("tcmalloc.pageheap_free_bytes", &value);
26 return value;
27 }
28 
30 {
31 size_t value;
32 MallocExtension_GetNumericProperty("tcmalloc.pageheap_unmapped_bytes", &value);
33 return value;
34 }
35 #else
36 #include <stdio.h>
38 {
39  return 0;
40 }
42 {
43  return 0;
44 }
46 {
47  return 0;
48 }
50 {
51  return 0;
52 }
53 #endif
size_t get_tcmalloc_heap_size_()
size_t get_tcmalloc_pageheap_unmapped_bytes_()
size_t get_tcmalloc_pageheap_free_bytes_()
PERFTOOLS_DLL_DECL int MallocExtension_GetNumericProperty(const char *property, size_t *value)
size_t get_tcmalloc_current_allocated_bytes_()