On Wed, Oct 10, 2012 at 9:57 PM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > efl: simplify mempools, nuke some and make remaining statically built. > > Now we always build the following memory pools statically: > - pass_through: calls malloc/free directly, useful to debug. > - chained_pool: default for ages. > - one_big: used by some embedded systems (should we remove?) > > Removed: > - ememoa_fixed and ememoa_unknown: depends on a separate lib, not > supported? > - buddy: nobody uses it?
please let turran say if he wants buddy or not before nuking it.. Vincent > > NOTE: we do not need the src/modules/eina/mp/*/Makefile.am anymore > since they are statically built. But I'll keep these and the > references in src/modules/eina/mp/Makefile.am > > > > Author: barbieri > Date: 2012-10-10 12:57:53 -0700 (Wed, 10 Oct 2012) > New Revision: 77792 > Trac: http://trac.enlightenment.org/e/changeset/77792 > > Removed: > trunk/efl/src/modules/eina/mp/buddy/ > trunk/efl/src/modules/eina/mp/ememoa_fixed/ > trunk/efl/src/modules/eina/mp/ememoa_unknown/ > trunk/efl/src/modules/eina/mp/fixed_bitmap/ > Modified: > trunk/efl/configure.ac trunk/efl/src/lib/eina/Makefile.am > trunk/efl/src/lib/eina/eina_mempool.c trunk/efl/src/lib/eina/eina_mempool.h > trunk/efl/src/modules/eina/mp/Makefile.am > > Modified: trunk/efl/configure.ac > =================================================================== > --- trunk/efl/configure.ac 2012-10-10 19:36:36 UTC (rev 77791) > +++ trunk/efl/configure.ac 2012-10-10 19:57:53 UTC (rev 77792) > @@ -343,23 +343,7 @@ > fi > > # Choose best memory pool > -AC_ARG_ENABLE([default-mempool], > - [AC_HELP_STRING([--enable-default-mempool], [Default memory allocator > could be faster for some computer. @<:@default=disabled@:>@])], > - [ > - if test "x${enableval}" = "xyes"; then > - have_default_mempool="yes" > - else > - have_default_mempool="no" > - fi > - ], > - [have_default_mempool="no"]) > - > -AC_MSG_CHECKING([whether to use default mempool allocator]) > -AC_MSG_RESULT([${have_default_mempool}]) > - > -if test "x${have_default_mempool}" = "xyes" ; then > - EINA_CONFIGURE_DEFAULT_MEMPOOL="#define EINA_DEFAULT_MEMPOOL" > -fi > +EINA_CONFIGURE_DEFAULT_MEMPOOL="#define EINA_DEFAULT_MEMPOOL" > AC_SUBST([EINA_CONFIGURE_DEFAULT_MEMPOOL]) > > ### Checks for programs > @@ -431,36 +415,11 @@ > fi > > ## Modules > - > -# Check ememoa memory pool library > - > -AC_ARG_ENABLE([ememoa], > - [AC_HELP_STRING([--enable-ememoa], [build ememoa memory pool module > @<:@default=yes@:>@])], > - [ > - if test "x${enableval}" = "xyes" ; then > - enable_ememoa="yes" > - else > - enable_ememoa="no" > - fi > - ], > - [enable_ememoa="yes"]) > - > -AC_MSG_CHECKING([whether to use ememoa for memory pool]) > -AC_MSG_RESULT([${enable_ememoa}]) > - > -if test "x${enable_ememoa}" = "xyes" ; then > - PKG_CHECK_MODULES([EMEMOA], > - [ememoa >= 0.0.26 ], > - [enable_ememoa="yes"], > - [enable_ememoa="no"]) > -fi > - > if ! test "x${requirements_pc_deps_eina}" = "x" ; then > PKG_CHECK_MODULES([EINA], [${requirements_pc_deps_eina}]) > fi > > > - > ## Examples > > # TODO: add once ecore-evas is merged: > @@ -596,26 +555,11 @@ > AM_CONDITIONAL([EINA_ON_OFF_THREADS], [! test "x${efl_have_on_off_threads}" > = "xno"]) > > ### Modules > +EINA_CHECK_MODULE([chained-pool], [static], [chained pool]) > +EINA_CHECK_MODULE([pass-through], [static], [pass through]) > +EINA_CHECK_MODULE([one-big], [static], [one big]) > > -if test "x${have_default_mempool}" = "xyes" ; then > - enable_chained_pool="no" > - enable_pass_through="static" > -else > - enable_chained_pool="static" > - enable_pass_through="no" > -fi > > -enable_one_big="static" > - > -EINA_CHECK_MODULE([chained-pool], [${enable_chained_pool}], [chained pool]) > -EINA_CHECK_MODULE([ememoa-fixed], [${enable_ememoa}], [ememoa fixed]) > -EINA_CHECK_MODULE([ememoa-unknown], [${enable_ememoa}], [ememoa > unknown]) > -EINA_CHECK_MODULE([fixed-bitmap], [no], [fixed bitmap]) > -EINA_CHECK_MODULE([pass-through], [${enable_pass_through}], [pass through]) > -EINA_CHECK_MODULE([buddy], [no], [buddy]) > -EINA_CHECK_MODULE([one-big], [${enable_one_big}], [one big]) > - > - > #### End of Eina > > > @@ -912,11 +856,7 @@ > src/modules/eina/Makefile > src/modules/eina/mp/Makefile > src/modules/eina/mp/chained_pool/Makefile > -src/modules/eina/mp/ememoa_fixed/Makefile > -src/modules/eina/mp/ememoa_unknown/Makefile > src/modules/eina/mp/pass_through/Makefile > -src/modules/eina/mp/fixed_bitmap/Makefile > -src/modules/eina/mp/buddy/Makefile > src/modules/eina/mp/one_big/Makefile > src/scripts/Makefile > src/scripts/eina/Makefile > @@ -966,15 +906,6 @@ > echo " File xattr...........: ${efl_func_setxattr}" > echo " shm_open.............: ${efl_func_shm_open}" > echo > -echo " Memory pools:" > -echo " Buddy..............: ${enable_buddy}" > -echo " Chained pool.......: ${enable_chained_pool}" > -echo " Ememoa fixed.......: ${enable_ememoa_fixed}" > -echo " Ememoa unknown.....: ${enable_ememoa_unknown}" > -echo " Fixed bitmap.......: ${enable_fixed_bitmap}" > -echo " One big............: ${enable_one_big}" > -echo " Pass through.......: ${enable_pass_through}" > -echo > echo "Compilation............: make (or gmake)" > echo " CPPFLAGS.............: $CPPFLAGS" > echo " CFLAGS...............: $CFLAGS" > > Modified: trunk/efl/src/lib/eina/Makefile.am > =================================================================== > --- trunk/efl/src/lib/eina/Makefile.am 2012-10-10 19:36:36 UTC (rev 77791) > +++ trunk/efl/src/lib/eina/Makefile.am 2012-10-10 19:57:53 UTC (rev 77792) > @@ -173,26 +173,10 @@ > > > > -if EINA_STATIC_BUILD_BUDDY > -libeina_la_SOURCES += $(top_srcdir)/src/modules/eina/mp/buddy/eina_buddy.c > -endif > - > if EINA_STATIC_BUILD_CHAINED_POOL > libeina_la_SOURCES += > $(top_srcdir)/src/modules/eina/mp/chained_pool/eina_chained_mempool.c > endif > > -if EINA_STATIC_BUILD_EMEMOA_FIXED > -libeina_la_SOURCES += > $(top_srcdir)/src/modules/eina/mp/ememoa_fixed/eina_ememoa_fixed.c > -endif > - > -if EINA_STATIC_BUILD_EMEMOA_UNKNOWN > -libeina_la_SOURCES += > $(top_srcdir)/src/modules/eina/mp/ememoa_unknown/eina_ememoa_unknown.c > -endif > - > -if EINA_STATIC_BUILD_FIXED_BITMAP > -libeina_la_SOURCES += > $(top_srcdir)/src/modules/eina/mp/fixed_bitmap/eina_fixed_bitmap.c > -endif > - > if EINA_STATIC_BUILD_ONE_BIG > libeina_la_SOURCES += > $(top_srcdir)/src/modules/eina/mp/one_big/eina_one_big.c > endif > > Modified: trunk/efl/src/lib/eina/eina_mempool.c > =================================================================== > --- trunk/efl/src/lib/eina/eina_mempool.c 2012-10-10 19:36:36 UTC (rev > 77791) > +++ trunk/efl/src/lib/eina/eina_mempool.c 2012-10-10 19:57:53 UTC (rev > 77792) > @@ -114,31 +114,11 @@ > > /* Built-in backend's prototypes */ > > -#ifdef EINA_STATIC_BUILD_BUDDY > -Eina_Bool buddy_init(void); > -void buddy_shutdown(void); > -#endif > - > #ifdef EINA_STATIC_BUILD_CHAINED_POOL > Eina_Bool chained_init(void); > void chained_shutdown(void); > #endif > > -#ifdef EINA_STATIC_BUILD_EMEMOA_FIXED > -Eina_Bool ememoa_fixed_init(void); > -void ememoa_fixed_shutdown(void); > -#endif > - > -#ifdef EINA_STATIC_BUILD_EMEMOA_UNKNOWN > -Eina_Bool ememoa_unknown_init(void); > -void ememoa_unknown_shutdown(void); > -#endif > - > -#ifdef EINA_STATIC_BUILD_FIXED_BITMAP > -Eina_Bool fixed_bitmap_init(void); > -void fixed_bitmap_shutdown(void); > -#endif > - > #ifdef EINA_STATIC_BUILD_ONE_BIG > Eina_Bool one_big_init(void); > void one_big_shutdown(void); > @@ -235,21 +215,9 @@ > eina_module_list_load(_modules); > > /* builtin backends */ > -#ifdef EINA_STATIC_BUILD_BUDDY > - buddy_init(); > -#endif > #ifdef EINA_STATIC_BUILD_CHAINED_POOL > chained_init(); > #endif > -#ifdef EINA_STATIC_BUILD_EMEMOA_FIXED > - ememoa_fixed_init(); > -#endif > -#ifdef EINA_STATIC_BUILD_EMEMOA_UNKNOWN > - ememoa_unknown_init(); > -#endif > -#ifdef EINA_STATIC_BUILD_FIXED_BITMAP > - fixed_bitmap_init(); > -#endif > #ifdef EINA_STATIC_BUILD_ONE_BIG > one_big_init(); > #endif > @@ -270,21 +238,9 @@ > eina_mempool_shutdown(void) > { > /* builtin backends */ > -#ifdef EINA_STATIC_BUILD_BUDDY > - buddy_shutdown(); > -#endif > #ifdef EINA_STATIC_BUILD_CHAINED_POOL > chained_shutdown(); > #endif > -#ifdef EINA_STATIC_BUILD_EMEMOA_FIXED > - ememoa_fixed_shutdown(); > -#endif > -#ifdef EINA_STATIC_BUILD_EMEMOA_UNKNOWN > - ememoa_unknown_shutdown(); > -#endif > -#ifdef EINA_STATIC_BUILD_FIXED_BITMAP > - fixed_bitmap_shutdown(); > -#endif > #ifdef EINA_STATIC_BUILD_ONE_BIG > one_big_shutdown(); > #endif > > Modified: trunk/efl/src/lib/eina/eina_mempool.h > =================================================================== > --- trunk/efl/src/lib/eina/eina_mempool.h 2012-10-10 19:36:36 UTC (rev > 77791) > +++ trunk/efl/src/lib/eina/eina_mempool.h 2012-10-10 19:57:53 UTC (rev > 77792) > @@ -31,25 +31,11 @@ > * > * Several mempool are available: > * > - * @li @c buddy: It uses the > - * <a href="http://en.wikipedia.org/wiki/Buddy_memory_allocation">"buddy > - * allocator" algorithm</a> but the Eina implementation differs in the > - * sense that the chunk information is not stored on the chunk itself, > - * but on another memory area. This is useful for cases where the > - * memory to manage might be slower to access, or limited (like video > - * memory). > * @li @c chained_pool: It is the default one. It allocates a big > * chunk of memory with malloc() and split the result in chunks of the > * requested size that are pushed inside a stack. When requested, it > * takes this pointer from the stack to give them to whoever wants > * them. > - * @li @c ememoa_fixed and @c ememoa_unknown: experimental allocators > - * which could be useful when a fixed amount of memory is needed. > - * @li @c fixed_bitmap: It allocates with malloc) 32* the requested > - * size and push the pool pointer in an rbtree. To find empty space in > - * a pool, it will just search for the first bit set in an int (32 > - * bits). Then, when a pointer is freed, it will do a search inside > - * the rbtree. > * @li @c pass_through: it just call malloc() and free(). It may be > * faster on some computers than using our own allocators (like having > * a huge L2 cache, over 4MB). > > Modified: trunk/efl/src/modules/eina/mp/Makefile.am > =================================================================== > --- trunk/efl/src/modules/eina/mp/Makefile.am 2012-10-10 19:36:36 UTC (rev > 77791) > +++ trunk/efl/src/modules/eina/mp/Makefile.am 2012-10-10 19:57:53 UTC (rev > 77792) > @@ -2,36 +2,12 @@ > > SUBDIRS = > > -if EINA_BUILD_BUDDY > -if !EINA_STATIC_BUILD_BUDDY > -SUBDIRS += buddy > -endif > -endif > - > if EINA_BUILD_CHAINED_POOL > if !EINA_STATIC_BUILD_CHAINED_POOL > SUBDIRS += chained_pool > endif > endif > > -if EINA_BUILD_EMEMOA_FIXED > -if !EINA_STATIC_BUILD_EMEMOA_FIXED > -SUBDIRS += ememoa_fixed > -endif > -endif > - > -if EINA_BUILD_EMEMOA_UNKNOWN > -if !EINA_STATIC_BUILD_EMEMOA_UNKNOWN > -SUBDIRS += ememoa_unknown > -endif > -endif > - > -if EINA_BUILD_FIXED_BITMAP > -if !EINA_STATIC_BUILD_FIXED_BITMAP > -SUBDIRS += fixed_bitmap > -endif > -endif > - > if EINA_BUILD_ONE_BIG > if !EINA_STATIC_BUILD_ONE_BIG > SUBDIRS += one_big > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel