I'm trying to help Benatto, and I found some strange things... When you call ecore_main_loop_glib_integrate(), it change main loop function to _ecore_glib_select (ecore_glib.c) instead of select (default one). I made some experiments and I saw when comment second line of function: GMutex *mutex = g_static_mutex_get_mutex(&lock); the leak stop... But We use glib a long time in blackfin, and I ran the follow test:
#include <stdio.h> #include <glib.h> int main(void) { for (;;) { GStaticMutex lock = G_STATIC_MUTEX_INIT; GMutex *mutex = g_static_mutex_get_mutex(&lock); } return 0; } Any leak occurs, I hope this experiments help someone to help us.. Regards, 2011/12/14 Paulo Benatto <bena...@gmail.com> > Hi all, > > I have a doubt about ecore_main_loop_glib_integrate() with > ecore_timer_add(). I did the example below, I compiled it to blackfin and > x86. My problem is, when I run in blackfin occurs a memory leak, in x86 is > ok (without leak). Is something wrong with my code? Any tips? I'm going to > study ecore code. Thanks. > > #include <Elementary.h> > #include <glib.h> > > static Ecore_Timer *update_datetime_timer = NULL; > > static Eina_Bool > _update_datetime_cb(void *data) > { > return EINA_TRUE; > } > > EAPI int > elm_main(int argc, char **argv) > { > (void)argc; > (void)argv; > > g_type_init(); > ecore_main_loop_glib_integrate(); > ecore_event_init(); > > update_datetime_timer = ecore_timer_add(0.01, _update_datetime_cb, > NULL); > > elm_run(); > > elm_shutdown(); > > return 0; > } > ELM_MAIN() > > Regards, > > -- > Paulo Leonardo Benatto, patito > "the fear of being free, makes you proud of being a slave" > > ------------------------------------------------------------------------------ > Cloud Computing - Latest Buzzword or a Glimpse of the Future? > This paper surveys cloud computing today: What are the benefits? > Why are businesses embracing it? What are its payoffs and pitfalls? > http://www.accelacomm.com/jaw/sdnl/114/51425149/ > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- Eng. Guilherme Silveira E-mail: xgu...@gmail.com Nextel: (48) 7811-8418 / ID: 85*227765 ------------------------------------------------------------------------------ 10 Tips for Better Server Consolidation Server virtualization is being driven by many needs. But none more important than the need to reduce IT complexity while improving strategic productivity. Learn More! http://www.accelacomm.com/jaw/sdnl/114/51507609/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel