File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 20582058AC_CHECK_HEADERS ( malloc.h ,ff_malloc_h=1 )
20592059AC_SUBST ( FF_MALLOC_H ,$ff_malloc_h )
20602060
2061- AC_CHECK_FUNCS ( asinh acosh atanh getenv jn erfc tgamma gettimeofday mallinfo mstats )
2061+ AC_CHECK_FUNCS ( asinh acosh atanh getenv jn erfc tgamma gettimeofday mallinfo2 mallinfo mstats )
20622062AC_CHECK_FUNCS ( srandomdev )
20632063
20642064
Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ long storageused()
8484 struct mstats mem1;
8585 mem1 = mstats ();
8686 return mem1.bytes_used ;
87+ #elif HAVE_MALLINFO2
88+ struct mallinfo2 mem1;
89+ mem1=mallinfo2 ();
90+ return static_cast <long >(mem1.uordblks );
8791#elif HAVE_MALLINFO
8892 struct mallinfo mem1;
8993 mem1=mallinfo ();
@@ -99,6 +103,10 @@ long storagetotal()
99103 struct mstats mem1;
100104 mem1 = mstats ();
101105 return mem1.bytes_total ;
106+ #elif HAVE_MALLINFO2
107+ struct mallinfo2 mem1;
108+ mem1=mallinfo2 ();
109+ return static_cast <long >(mem1.keepcost );
102110#elif HAVE_MALLINFO
103111 struct mallinfo mem1;
104112 mem1=mallinfo ();
You can’t perform that action at this time.
0 commit comments