From a59e49a545c931470dcb12a993f87d4eec87a1b7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 5 Dec 2005 06:01:10 +0000 Subject: [PATCH] Updates 2005-12-05 Matthias Clasen * gobject/tmpl/generic_values.sgml: * glib/tmpl/trees-nary.sgml: * glib/tmpl/linked_lists_double.sgml: * glib/tmpl/linked_lists_single.sgml: * glib/tmpl/memory_chunks.sgml: * glib/tmpl/allocators.sgml: * glib/tmpl/macros_misc.sgml: Updates * glib/Makefile.am: Ignore gmirroringtable.h --- docs/reference/ChangeLog | 8 +++++ docs/reference/glib/tmpl/allocators.sgml | 33 +++++++------------ .../glib/tmpl/linked_lists_double.sgml | 12 +++++-- .../glib/tmpl/linked_lists_single.sgml | 19 +++++++---- docs/reference/glib/tmpl/macros_misc.sgml | 4 ++- docs/reference/glib/tmpl/trees-nary.sgml | 8 +++-- .../gobject/tmpl/generic_values.sgml | 2 +- 7 files changed, 49 insertions(+), 37 deletions(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index e8a73bbd9..3fad98111 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,5 +1,13 @@ 2005-12-05 Matthias Clasen + * gobject/tmpl/generic_values.sgml: + * glib/tmpl/trees-nary.sgml: + * glib/tmpl/linked_lists_double.sgml: + * glib/tmpl/linked_lists_single.sgml: + * glib/tmpl/memory_chunks.sgml: + * glib/tmpl/allocators.sgml: + * glib/tmpl/macros_misc.sgml: Updates + * glib/Makefile.am: Ignore gmirroringtable.h 2005-12-04 Matthias Clasen diff --git a/docs/reference/glib/tmpl/allocators.sgml b/docs/reference/glib/tmpl/allocators.sgml index 54eb60bbb..4c17583ae 100644 --- a/docs/reference/glib/tmpl/allocators.sgml +++ b/docs/reference/glib/tmpl/allocators.sgml @@ -2,31 +2,16 @@ Memory Allocators -allocates chunks of memory for #GList, #GSList and #GNode. +deprecated way to allocate chunks of memory for #GList, #GSList and #GNode. -The #GAllocator is used as an efficient way to allocate small pieces of -memory for use with the #GList, #GSList and #GNode data structures. -It uses a #GMemChunk so elements are allocated in groups, rather than -individually. -The #GList, #GSList and #GNode implementations create default #GAllocator -objects, which are probably sufficient for most purposes. These default -allocators use blocks of 128 elements. - - -To use your own #GAllocator, create it with g_allocator_new(). Then -use g_list_push_allocator(), g_slist_push_allocator() or -g_node_push_allocator() before any code which allocates new #GList, #GSList -or #GNode elements respectively. After allocating the new elements, you must -use g_list_pop_allocator(), g_slist_pop_allocator() or g_node_pop_allocator() -to restore the previous allocators. - - -Note that you cannot use the same allocator for #GList, #GSList and #GNode -elements. Each must use separate allocators. +Prior to 2.10, #GAllocator was used as an efficient way to allocate +small pieces of memory for use with the #GList, #GSList and #GNode data +structures. Since 2.10, it has been completely replaced by the +slice allocator and deprecated. @@ -39,8 +24,8 @@ elements. Each must use separate allocators. -The GAllocator struct contains private data. and should only be accessed -using the following functions. +The GAllocator struct contains private data. and +should only be accessed using the following functions. @@ -56,6 +41,8 @@ Larger blocks mean less calls to g_malloc(), but some memory may be wasted. (GLib uses 128 elements per block by default.) The value must be between 1 and 65535. @Returns: a new #GAllocator. +@Deprecated: Use the slice allocator +instead @@ -64,5 +51,7 @@ Frees all of the memory allocated by the #GAllocator. @allocator: a #GAllocator. +@Deprecated: Use the slice allocator +instead diff --git a/docs/reference/glib/tmpl/linked_lists_double.sgml b/docs/reference/glib/tmpl/linked_lists_double.sgml index 4500af9aa..b33c3d692 100644 --- a/docs/reference/glib/tmpl/linked_lists_double.sgml +++ b/docs/reference/glib/tmpl/linked_lists_double.sgml @@ -25,8 +25,9 @@ of the or simply pointers to any type of data. -List elements are allocated in blocks using a #GAllocator, which is -more efficient than allocating elements individually. +List elements are allocated from the slice +allocator, which is more efficient than allocating elements +individually. Note that most of the #GList functions expect to be passed a pointer to @@ -224,7 +225,7 @@ the first node matching the given data. Frees all of the memory used by a #GList. -The freed elements are added to the #GAllocator free list. +The freed elements are returned to the slice allocator. @@ -501,6 +502,8 @@ with @allocator: the #GAllocator to use when allocating #GList elements. +@Deprecated: Since 2.10, it does nothing, since #GList has been +converted to the slice allocator @@ -512,5 +515,8 @@ Note that this function is not available if GLib has been compiled with +@Deprecated: Since 2.10, it does nothing, since #GList has been +converted to the slice allocator + diff --git a/docs/reference/glib/tmpl/linked_lists_single.sgml b/docs/reference/glib/tmpl/linked_lists_single.sgml index 3cf50d27b..e66227435 100644 --- a/docs/reference/glib/tmpl/linked_lists_single.sgml +++ b/docs/reference/glib/tmpl/linked_lists_single.sgml @@ -25,8 +25,9 @@ of the or simply pointers to any type of data. -List elements are allocated in blocks using a #GAllocator, which is -more efficient than allocating elements individually. +List elements are allocated from the slice +allocator, which is more efficient than allocating elements +individually. Note that most of the #GSList functions expect to be passed a pointer to @@ -232,7 +233,7 @@ the first node matching the given data. Frees all of the memory used by a #GSList. -The freed elements are added to the #GAllocator free list. +The freed elements are returned to the slice allocator. @list: a #GSList. @@ -247,13 +248,14 @@ It is usually used after g_slist_remove_link(). @list: a #GSList element. - + A macro which does the same as g_slist_free_1(). @Since: 2.10 + Gets the number of elements in a #GSList. @@ -431,9 +433,9 @@ Note that this function is not available if GLib has been compiled with -@dummy: - -@allocator: the #GAllocator to use when allocating #GSList elements. +@dummy: the #GAllocator to use when allocating #GSList elements. +@Deprecated: Since 2.10, it does nothing, since #GSList has been +converted to the slice allocator @@ -445,5 +447,8 @@ Note that this function is not available if GLib has been compiled with +@Deprecated: Since 2.10, it does nothing, since #GSList has been +converted to the slice allocator + diff --git a/docs/reference/glib/tmpl/macros_misc.sgml b/docs/reference/glib/tmpl/macros_misc.sgml index 38e97c26c..08871ee3e 100644 --- a/docs/reference/glib/tmpl/macros_misc.sgml +++ b/docs/reference/glib/tmpl/macros_misc.sgml @@ -250,6 +250,7 @@ See the GNU C documentation for details. Since: 2.8 + Expands to the GNU C warn_unused_ersult function attribute @@ -258,7 +259,8 @@ attribute makes the compiler emit a warning if the result of a function call is ignored. See the GNU C documentation for details. -Since: 2.10 +@Since: 2.10 + diff --git a/docs/reference/glib/tmpl/trees-nary.sgml b/docs/reference/glib/tmpl/trees-nary.sgml index 041dfdcec..aafa0e4ca 100644 --- a/docs/reference/glib/tmpl/trees-nary.sgml +++ b/docs/reference/glib/tmpl/trees-nary.sgml @@ -527,9 +527,9 @@ Note that this function is not available if GLib has been compiled with -@dummy: - -@allocator: the #GAllocator to use when allocating #GNode elements. +@dummy: the #GAllocator to use when allocating #GNode elements. +@Deprecated: Since 2.10, it does nothing, since #GNode has been +converted to the slice allocator @@ -541,5 +541,7 @@ Note that this function is not available if GLib has been compiled with +@Deprecated: Since 2.10, it does nothing, since #GNode has been +converted to the slice allocator diff --git a/docs/reference/gobject/tmpl/generic_values.sgml b/docs/reference/gobject/tmpl/generic_values.sgml index 10ddb6ccf..ec254f4e5 100644 --- a/docs/reference/gobject/tmpl/generic_values.sgml +++ b/docs/reference/gobject/tmpl/generic_values.sgml @@ -163,7 +163,7 @@ value_table's collect_value() function. @value: An initialized #GValue structure. -@instance: +@instance: the instance