summaryrefslogtreecommitdiff
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
parentf8a98e5bf208a4b17155bda42b3f60295ab90b09 (diff)
downloadefl-17137316eeb728a30c3c14e4b3a2f1cd8765bbfc.tar.gz
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
-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;
Global = Local;
static Eina_Bool _ecore_memory_statistic(void *data);
-static int _ecore_memory_max_total = 0;
-static int _ecore_memory_max_free = 0;
+static size_t _ecore_memory_max_total = 0;
+static size_t _ecore_memory_max_free = 0;
static pid_t _ecore_memory_pid = 0;
#ifdef HAVE_MALLOC_INFO
static FILE *_ecore_memory_statistic_file = NULL;
@@ -437,7 +437,7 @@ ecore_shutdown(void)
{
_ecore_memory_statistic(NULL);
- ERR("[%i] Memory MAX total: %i, free: %i",
+ ERR("[%i] Memory MAX total: %lu, free: %lu",
_ecore_memory_pid,
_ecore_memory_max_total,
_ecore_memory_max_free);
@@ -971,12 +971,12 @@ _ecore_memory_statistic(EINA_UNUSED void *data)
static int frame = 0;
#endif
#ifdef HAVE_MALLINFO
- struct mallinfo mi;
- static int uordblks = 0;
- static int fordblks = 0;
+ struct mallinfo2 mi;
+ static size_t uordblks = 0;
+ static size_t fordblks = 0;
Eina_Bool changed = EINA_FALSE;
- mi = mallinfo();
+ mi = mallinfo2();
#define HAS_CHANGED(Global, Local) \
if (Global != Local) \
@@ -989,7 +989,7 @@ _ecore_memory_statistic(EINA_UNUSED void *data)
HAS_CHANGED(fordblks, mi.fordblks);
if (changed)
- ERR("[%i] Memory total: %i, free: %i",
+ ERR("[%i] Memory total: %lu, free: %lu",
_ecore_memory_pid,
mi.uordblks,
mi.fordblks);