glib/glib-sections.txt document g_slice_copy() and g_slice_dup().

2007-06-13  Sven Neumann  <sven@gimp.org>

	* glib/glib-sections.txt
	* glib/tmpl/memory_slices.sgml: document g_slice_copy() and
	g_slice_dup().


svn path=/trunk/; revision=5555
This commit is contained in:
Sven Neumann 2007-06-13 18:58:49 +00:00 committed by Sven Neumann
parent 57336cec3f
commit ecab745847
3 changed files with 37 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-06-13 Sven Neumann <sven@gimp.org>
* glib/glib-sections.txt
* glib/tmpl/memory_slices.sgml: document g_slice_copy() and
g_slice_dup().
2007-06-13 Matthias Clasen <mclasen@redhat.com>
* glib/tmpl/warnings.sgml: Add some verbiage about

View File

@ -1735,12 +1735,14 @@ g_mem_chunk_print
<FILE>memory_slices</FILE>
g_slice_alloc
g_slice_alloc0
g_slice_copy
g_slice_free1
g_slice_free_chain_with_offset
<SUBSECTION>
g_slice_new
g_slice_new0
g_slice_dup
g_slice_free
g_slice_free_chain

View File

@ -121,6 +121,18 @@ environment variable.
@Since: 2.10
<!-- ##### FUNCTION g_slice_copy ##### -->
<para>
Allocates a block of memory from the slice allocator and copies
@block_size bytes into it from @mem_block.
</para>
@block_size: the number of bytes to allocate
@mem_block: the memory to copy
@Returns: a pointer to the allocated memory block
@Since: 2.14
<!-- ##### FUNCTION g_slice_free1 ##### -->
<para>
Frees a block of memory. The memory must have been allocated via
@ -186,6 +198,23 @@ environment variable.
@Since: 2.10
<!-- ##### MACRO g_slice_dup ##### -->
<para>
A convenience macro to duplicate a block of memory using the slice allocator.
It calls g_slice_copy() with <literal>sizeof (@type)</literal> and casts
the returned pointer to a pointer of the given type, avoiding a type cast
in the source code.
Note that the underlying slice allocation mechanism can
be changed with the <link linkend="G_SLICE">G_SLICE=always-malloc</link>
environment variable.
</para>
@type: the type to duplicate, typically a structure name
@mem: the memory to copy into the allocated block
@Returns: a pointer to the allocated block, cast to a pointer to @type.
@Since: 2.14
<!-- ##### MACRO g_slice_free ##### -->
<para>
A convenience macro to free a block of memory that has been allocated