diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-11-04 19:06:15 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-11-06 13:13:10 +0900 |
commit | 0ee33e7b4b3932756b017739b3a578c5198aa041 (patch) | |
tree | 9292cbde8aa14be4a90c86e23c070acf0044fbbb /src/tests/eina/eina_suite.h | |
parent | 8b523c21e2e54bfbf072f39f8234d3a289e3ce26 (diff) | |
download | efl-0ee33e7b4b3932756b017739b3a578c5198aa041.tar.gz |
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 'src/tests/eina/eina_suite.h')
-rw-r--r-- | src/tests/eina/eina_suite.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tests/eina/eina_suite.h b/src/tests/eina/eina_suite.h index 3ff362e7bd..3bda471d1f 100644 --- a/src/tests/eina/eina_suite.h +++ b/src/tests/eina/eina_suite.h @@ -73,5 +73,6 @@ void eina_test_promise(TCase *tc); void eina_test_bezier(TCase *tc); void eina_test_safepointer(TCase *tc); void eina_test_slice(TCase *tc); +void eina_test_freeq(TCase *tc); #endif /* EINA_SUITE_H_ */ |