Re: problem of monitoring directory

2011-04-08 Thread Aleksander Morgado
>     I am very sorry to trouble you, but I can not handle a problem about my > program for a long time, I hope someone can help me, thank you very much! >      The program is to monitor directories and report the events occoured in > directory shuch as deleting files , creating files and so on. My

Re: Memory leaks in using g_ptr_array_free() of GLib?

2010-04-11 Thread Aleksander Morgado
> First of all, sorry if this is not the adecuate list to ask about > GLib, but I haven't found the list about GLib. > Yes, this is the proper list also for GLib related questions. valgrind --leak-check=full ./memptr > > In order to have some proper results with Valgrind, you always need to tell

Re: (GLib) How to remove a Child Watch source that is not needed any more?

2010-01-20 Thread Aleksander Morgado
Hi again, I use g_child_watch_source_new() to get notified when a spawned process > exits. It works as expected, but if I ever need to stop taking care of it, > this is, the parent process doesn't need to check if the child process is > still being executed, I see that I cannot detach it from the

(GLib) How to remove a Child Watch source that is not needed any more?

2010-01-20 Thread Aleksander Morgado
Hi all, I use g_child_watch_source_new() to get notified when a spawned process exits. It works as expected, but if I ever need to stop taking care of it, this is, the parent process doesn't need to check if the child process is still being executed, I see that I cannot detach it from the main con

g_type_instance_get_private() is thread safe in glib 2.12 ?

2010-01-05 Thread Aleksander Morgado
Hi all, Is g_type_instance_get_private() thread safe in glib 2.12 ? AFAIK, GObject type initializations are not thread safe in glib 2.12 (default one in RHEL5.2), but what about g_type_instance_get_private() method? Valgrind-Helgrind is reporting lots of "possible data races" between g_type_inst

g_source_destroy() needed for a Child Watch GSource ?

2009-12-30 Thread Aleksander Morgado
GLib can setup a child watch function which works as a non-blocking waitpid() function attached to a main loop. I can create such GSource with g_child_watch_source_new(), set a callback function and attach it to a main loop. Then, the callback gets called when Child process being watched exits, I

g_info ?

2009-12-16 Thread Aleksander Morgado
Hi all, This question showed up some time ago already, but got no response: http://www.mail-archive.com/gtk-list@gnome.org/msg25449.html So here it's again :-) Each log level has a corresponding macro, like g_debug and G_LOG_LEVEL_DEBUG; except for G_LOG_LEVEL_INFO: there is no such g_info() mac

Documenting a struct with gtk-doc

2009-12-14 Thread Aleksander Morgado
Hi all, So, I want to document the contents of a standard C struct in gtk-doc. The problem is that I don't typedef it, so rather than: typedef struct { int a; } my_struct; the code is actually: struct my_struct { int a; }; Now, if I use the typedef-version of the struct, I can successfu

Re: g_malloc() segfault in glib 2.12?

2009-12-05 Thread Aleksander Morgado
> > I am experiencing a segfault in calling g_malloc() inside a > > > multi-threaded application, using glib2-2.12.3-2.fc6 (default one in > > > RHEL5.2). The glib slice allocator is being used. > > > > Have you called g_thread_init()? > > Or, rather: > >Do you call g_thread_init() as the abso

g_malloc() segfault in glib 2.12?

2009-12-04 Thread Aleksander Morgado
Hi all, I am experiencing a segfault in calling g_malloc() inside a multi-threaded application, using glib2-2.12.3-2.fc6 (default one in RHEL5.2). The glib slice allocator is being used. My understanding is that g_malloc() will actually abort if no memory allocation can be done, but the signal I

Re: Memory leaks

2009-07-13 Thread Aleksander Morgado
> > BTW, if anyone has a better way of tracing memleaks in glib/gtk based > apps, without valgrind or using it in another way, steps are welcome! > > > > Here is some info on purify that someone may find useful: > > Oh, non-free software... discarded... but thanks for the info :-)

Re: Memory leaks

2009-07-13 Thread Aleksander Morgado
> > > I might be a bit of a puritan but I am puzzled about the following. > Running > > valgrind over my program I noticed a lot of unfreed block on application > > close. I decided to run a basic GTK program and see what happened. > > I do this a lot on Chrome. First, as described in > http://li

Thread-safety issue in GObjects

2009-05-21 Thread Aleksander Morgado
Hi all, Small question about GObject management in multi-threaded applications. I've got a GObject with a "gpointer priv" in the GObject struct, which is just a pointer to the private info of the object. That pointer is set to NULL when g_object_unref() is called, after the private data has been

Re: ref/unref in GObjects thread safe?

2009-04-08 Thread Aleksander Morgado
> > Are g_object_ref() and g_object_unref() completely thread-safe? > > This states that manipulation of the reference count with > g_object_ref() and go_object_unref() is thread-safe as from glib-2.8: > > http://library.gnome.org/devel/gobject/stable/gobject-memory.html#gobject-memory-refcount >

ref/unref in GObjects thread safe?

2009-04-08 Thread Aleksander Morgado
Are g_object_ref() and g_object_unref() completely thread-safe? Cheers, -Aleksander ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Re: GTrashStack question

2008-11-10 Thread Aleksander Morgado
; On Fri, Nov 7, 2008 at 7:36 AM, Aleksander Morgado > <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> Are the operations of a GTrashStack in glib thread-safe? >> >> Cheers, >> -Aleksander >> ___ >>

GTrashStack question

2008-11-07 Thread Aleksander Morgado
Hi all, Are the operations of a GTrashStack in glib thread-safe? Cheers, -Aleksander ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list