ROOT-Sim core  3.0.0-rc.2
A General-Purpose Multi-threaded Parallel/Distributed Simulation Library
mem.h
Go to the documentation of this file.
1 
12 #pragma once
13 
14 #include <arch/platform.h>
15 
16 #include <stddef.h>
17 
18 #ifdef __WINDOWS
19 #include <malloc.h>
20 #define mem_aligned_alloc(align, mem_size) _aligned_malloc(mem_size, align)
21 #define mem_aligned_free(mem) _aligned_free(mem)
22 #else
23 #include <stdlib.h>
25 #define mem_aligned_alloc(align, mem_size) aligned_alloc(align, mem_size)
27 #define mem_aligned_free(mem) free(mem)
28 #endif
29 
30 
31 extern int mem_stat_setup(void);
32 extern size_t mem_stat_rss_max_get(void);
33 extern size_t mem_stat_rss_current_get(void);
size_t mem_stat_rss_max_get(void)
Get the maximum size of the resident set since program beginning.
size_t mem_stat_rss_current_get(void)
Get the current size of the resident set.
int mem_stat_setup(void)
Initialize the platform specific memory statistics facilities.
Determine on what OS we are compiling.