summaryrefslogtreecommitdiff
path: root/src/Makefile_Eina.am
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-11-04 19:06:15 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-11-06 13:13:10 +0900
commit0ee33e7b4b3932756b017739b3a578c5198aa041 (patch)
tree9292cbde8aa14be4a90c86e23c070acf0044fbbb /src/Makefile_Eina.am
parent8b523c21e2e54bfbf072f39f8234d3a289e3ce26 (diff)
eina - add a free queue (eina_freeq) for deferring frees of data
this adds eina_freeq api's for c land for deferring freeing of pointers and can be used a s a simple copy & paste drop-in for free() just to "do this later". the pointer will eveentually be freed as eina_shutdown will free the main free queue and this will in turn free everything in it. as long as the main lo0op keeps pumping things will og on the queue and then be freed from it. free queues have limits so if they get full they will clear out old pointers and free them so it won't grow without bound. the default max is 1mb of data or 16384 items whichever limit is hit first and at that point the oldest item will be freed to make room for the newest. the mainloop whenever it finishes idle enterers will add an idler to spin and free while idle. the sizes can be tuned and aruged about as to what defaults should be. this also allows for better memory debugging too by being able to fill freed memory with patterns if its small enough etc. etc. @feature
Diffstat (limited to '')
-rw-r--r--src/Makefile_Eina.am11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Makefile_Eina.am b/src/Makefile_Eina.am
index 22ade8feba..bb1037e020 100644
--- a/src/Makefile_Eina.am
+++ b/src/Makefile_Eina.am
@@ -102,7 +102,9 @@ lib/eina/eina_safepointer.h \
102lib/eina/eina_inline_safepointer.x \ 102lib/eina/eina_inline_safepointer.x \
103lib/eina/eina_slice.h \ 103lib/eina/eina_slice.h \
104lib/eina/eina_inline_slice.x \ 104lib/eina/eina_inline_slice.x \
105lib/eina/eina_inline_modinfo.x 105lib/eina/eina_inline_modinfo.x \
106lib/eina/eina_freeq.h
107
106 108
107lib_eina_libeina_la_SOURCES = \ 109lib_eina_libeina_la_SOURCES = \
108lib/eina/eina_abi.c \ 110lib/eina/eina_abi.c \
@@ -175,7 +177,9 @@ lib/eina/eina_strbuf_common.h \
175lib/eina/eina_quaternion.c \ 177lib/eina/eina_quaternion.c \
176lib/eina/eina_promise.c \ 178lib/eina/eina_promise.c \
177lib/eina/eina_bezier.c \ 179lib/eina/eina_bezier.c \
178lib/eina/eina_safepointer.c 180lib/eina/eina_safepointer.c \
181lib/eina/eina_freeq.c
182
179 183
180if HAVE_WIN32 184if HAVE_WIN32
181lib_eina_libeina_la_SOURCES += lib/eina/eina_file_win32.c 185lib_eina_libeina_la_SOURCES += lib/eina/eina_file_win32.c
@@ -346,7 +350,8 @@ tests/eina/eina_test_vector.c \
346tests/eina/eina_test_promise.c \ 350tests/eina/eina_test_promise.c \
347tests/eina/eina_test_bezier.c \ 351tests/eina/eina_test_bezier.c \
348tests/eina/eina_test_safepointer.c \ 352tests/eina/eina_test_safepointer.c \
349tests/eina/eina_test_slice.c 353tests/eina/eina_test_slice.c \
354tests/eina/eina_test_freeq.c
350 355
351tests_eina_eina_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ 356tests_eina_eina_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
352-DTESTS_WD=\"`pwd`\" \ 357-DTESTS_WD=\"`pwd`\" \