Merge remote-tracking branch 'origin/release-v4.5.2'
[WRF.git] / var / da / da_tracing / da_memory.c
blob1c3ae9f737b052e5a11e788f2e4f0aa652f4f892
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <time.h>
6 #if !(defined(MACOS) || defined(IRIX))
7 #include <malloc.h>
8 #endif
10 #ifdef NOUNDERSCORE
11 void da_memory(
12 #else
13 #ifdef F2CSTYLE
14 void da_memory__(
15 #else
16 void da_memory_(
17 #endif
18 #endif
20 memory_used)
22 int *memory_used;
25 #if !(defined(vpp) || defined(vpp2) || defined(SUN) || defined(crayx1) || defined(MACOS)) || defined(IRIX)
26 struct mallinfo result;
28 result=mallinfo();
29 /* return memory in kbytes, both for smaller numbers, and to avoid going outside integer*4 range */
30 *memory_used=result.uordblks/1024;
31 #else
32 *memory_used=0;
33 #endif