summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristopher Michael <devilhorns@comcast.net>2021-02-16 12:41:56 -0500
committerChristopher Michael <devilhorns@comcast.net>2021-02-16 12:41:56 -0500
commit17137316eeb728a30c3c14e4b3a2f1cd8765bbfc (patch)
tree6d020d33c7c221382385c11dd14bac5eb36f53b5 /src/lib
parentf8a98e5bf208a4b17155bda42b3f60295ab90b09 (diff)
ecore: Update to not use deprecated mallinfo
mallinfo (the structure) and mallinfo (the function) have both been deprecated in favor of mallinfo2 which has been updated to handle allocations > 4GB. This patch updates ecore usage of deprecated mallinfo to use mallinfo2
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore/ecore.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 0d79b621b2..c3ffaa4165 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -51,8 +51,8 @@ EAPI double _efl_startup_time = 0;
51 Global = Local; 51 Global = Local;
52 52
53static Eina_Bool _ecore_memory_statistic(void *data); 53static Eina_Bool _ecore_memory_statistic(void *data);
54static int _ecore_memory_max_total = 0; 54static size_t _ecore_memory_max_total = 0;
55static int _ecore_memory_max_free = 0; 55static size_t _ecore_memory_max_free = 0;
56static pid_t _ecore_memory_pid = 0; 56static pid_t _ecore_memory_pid = 0;
57#ifdef HAVE_MALLOC_INFO 57#ifdef HAVE_MALLOC_INFO
58static FILE *_ecore_memory_statistic_file = NULL; 58static FILE *_ecore_memory_statistic_file = NULL;
@@ -437,7 +437,7 @@ ecore_shutdown(void)
437 { 437 {
438 _ecore_memory_statistic(NULL); 438 _ecore_memory_statistic(NULL);
439 439
440 ERR("[%i] Memory MAX total: %i, free: %i", 440 ERR("[%i] Memory MAX total: %lu, free: %lu",
441 _ecore_memory_pid, 441 _ecore_memory_pid,
442 _ecore_memory_max_total, 442 _ecore_memory_max_total,
443 _ecore_memory_max_free); 443 _ecore_memory_max_free);
@@ -971,12 +971,12 @@ _ecore_memory_statistic(EINA_UNUSED void *data)
971 static int frame = 0; 971 static int frame = 0;
972#endif 972#endif
973#ifdef HAVE_MALLINFO 973#ifdef HAVE_MALLINFO
974 struct mallinfo mi; 974 struct mallinfo2 mi;
975 static int uordblks = 0; 975 static size_t uordblks = 0;
976 static int fordblks = 0; 976 static size_t fordblks = 0;
977 Eina_Bool changed = EINA_FALSE; 977 Eina_Bool changed = EINA_FALSE;
978 978
979 mi = mallinfo(); 979 mi = mallinfo2();
980 980
981#define HAS_CHANGED(Global, Local) \ 981#define HAS_CHANGED(Global, Local) \
982 if (Global != Local) \ 982 if (Global != Local) \
@@ -989,7 +989,7 @@ _ecore_memory_statistic(EINA_UNUSED void *data)
989 HAS_CHANGED(fordblks, mi.fordblks); 989 HAS_CHANGED(fordblks, mi.fordblks);
990 990
991 if (changed) 991 if (changed)
992 ERR("[%i] Memory total: %i, free: %i", 992 ERR("[%i] Memory total: %lu, free: %lu",
993 _ecore_memory_pid, 993 _ecore_memory_pid,
994 mi.uordblks, 994 mi.uordblks,
995 mi.fordblks); 995 mi.fordblks);