Odd array allocation in GtkAboutDialog.xs



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]