From 5dcc502f914db3b57599e6740345b46292a979a4 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 4 Oct 2011 10:14:35 +0100 Subject: [PATCH] Document that types are limited to 64 KiB Bug: https://bugzilla.gnome.org/show_bug.cgi?id=659916 Signed-off-by: Simon McVittie --- gobject/gtype.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gobject/gtype.c b/gobject/gtype.c index 748bd9b07..3d79f7bf0 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -65,6 +65,13 @@ * structure and a #GTypeFundamentalInfo structure but it is seldom used * since most fundamental types are predefined rather than user-defined. * + * Type instance and class structs are limited to a total of 64 KiB, + * including all parent types. Similarly, type instances' private data + * (as created by g_type_class_add_private()) are limited to a total of + * 64 KiB. If a type instance needs a large static buffer, allocate it + * separately (typically by using #GArray or #GPtrArray) and put a pointer + * to the buffer in the structure. + * * A final word about type names. * Such an identifier needs to be at least three characters long. There is no * upper length limit. The first character needs to be a letter (a-z or A-Z) @@ -4392,7 +4399,7 @@ g_type_init (void) * structures. * * Note that the accumulated size of the private structures of - * a type and all its parent types cannot excced 64kB. + * a type and all its parent types cannot excced 64 KiB. * * This function should be called in the type's class_init() function. * The private structure can be retrieved using the