Re: What is the maximum length of a g_slist?



A gslist can be any length, but you're right, g_slist_length() will
return an incorrect result over 4g items.

You can't hit that limit on a 32-bit machine, but you could on a
64-bit. You'd need 2 pointers plus a data item (say 4 bytes for the
data), so 20 bytes per entry. 20 * 2 ** 32 is about 80 GBytes of RAM.

On 11/30/06, Christ, Bryan <bryan christ hp com> wrote:
Since g_slist_length returns a guint, I assume the max is G_MAXUINT

Is this correct?
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list




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