[gtkada] memory allocation problems in Gtkada 3.4.2?

Dmitry A. Kazakov mailbox at dmitry-kazakov.de
Tue Mar 25 09:42:12 CET 2014


On Mon, 24 Mar 2014 22:00:08 +0100, you wrote:

> A stab in the dark: these problems make it sound like there are two
> competing memory allocators: one in GTK+ and the other in the Ada
> runtime.  They seem to step on each other's toes.  In theory, both
> allocators should ultimately be malloc from glibc but there is always a
> chance that either GTK+ or the Ada RTS tries to do something "clever"
> like perhaps using tcmalloc.  Or, maybe one uses 64-bit alignment while
> the other uses 32-bit alignment.

Maybe. One hint. I found that if a String column of Gtk_List_Store is set
using Set, which ultimately calls some opaque subprogram from GtkAda, that
leads to memory corruption after several rounds. But when the same column
is set using the GValue path, which goes straight to GTK, everything seems
working.

BTW, it is not solely the pool, the problem manifests itself as the call
stack being destroyed.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


More information about the gtkada mailing list