Odd array allocation in GtkAboutDialog.xs

View: New views
1 Messages — Rating Filter:   Alert me  

Odd array allocation in GtkAboutDialog.xs

by Emmanuel Rodriguez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've found a strange memory allocation in GtkAboutDialog.xs and I don't understand why. Take a look at the following macro:

#define SETTER(outof)                        \
    {                            \
        gint num = items - 1;                \
        (outof) = g_new0 (gchar *, num + 30);        \
        for (i = 0; i < num; i++)            \
            (outof)[i] = SvGChar (ST (1 + i));    \
    }

It allocates and array with 30 extra elements. I don't understand why such extreme generosity.

--
Emmanuel Rodriguez

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@...
http://mail.gnome.org/mailman/listinfo/gtk-perl-list