Re: What is the maximum length of a g_slist?
- From: "John Cupitt" <jcupitt gmail com>
- To: bryan christ hp com
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: What is the maximum length of a g_slist?
- Date: Thu, 30 Nov 2006 17:15:25 +0000
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]