mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-21 19:54:51 +02:00
fix a formatting problem
This commit is contained in:
parent
7d5800d718
commit
cab5611661
@ -6,10 +6,10 @@ efficient way to allocate groups of equal-sized chunks of memory.
|
|||||||
|
|
||||||
<!-- ##### SECTION Long_Description ##### -->
|
<!-- ##### SECTION Long_Description ##### -->
|
||||||
<para>
|
<para>
|
||||||
Memory slices provide a space-efficient and multi processing scalable
|
Memory slices provide a space-efficient and multi-processing scalable
|
||||||
way to allocate equal-sized pieces of memory, just like the original
|
way to allocate equal-sized pieces of memory, just like the original
|
||||||
#GMemChunks (from GLib <= 2.8), while avoiding their excessive
|
#GMemChunks (from GLib <= 2.8), while avoiding their excessive
|
||||||
memroy-waste scalability and performance problems.
|
memory-waste, scalability and performance problems.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -21,8 +21,8 @@ memory allocator. USENIX 1994, and
|
|||||||
<ulink url="http://citeseer.ist.psu.edu/bonwick01magazines.html">[Bonwick01]</ulink> Bonwick and Jonathan Adams, Magazines and vmem: Extending the
|
<ulink url="http://citeseer.ist.psu.edu/bonwick01magazines.html">[Bonwick01]</ulink> Bonwick and Jonathan Adams, Magazines and vmem: Extending the
|
||||||
slab allocator to many cpu's and arbitrary resources. USENIX 2001
|
slab allocator to many cpu's and arbitrary resources. USENIX 2001
|
||||||
</para></footnote>.
|
</para></footnote>.
|
||||||
It uses posix_memalign() to optimize allocations of many equally
|
It uses posix_memalign() to optimize allocations of many equally-sized
|
||||||
sized chunks, and has per-thread free lists (the so-called magazine layer)
|
chunks, and has per-thread free lists (the so-called magazine layer)
|
||||||
to quickly satisfy allocation requests of already known structure sizes.
|
to quickly satisfy allocation requests of already known structure sizes.
|
||||||
This is accompanied by extra caching logic to keep freed memory around
|
This is accompanied by extra caching logic to keep freed memory around
|
||||||
for some time before returning it to the system. Memory that is unused
|
for some time before returning it to the system. Memory that is unused
|
||||||
@ -85,12 +85,10 @@ object size used at allocation time is still available when freeing.
|
|||||||
g_slice_free (GRealArray, array);
|
g_slice_free (GRealArray, array);
|
||||||
</programlisting></example>
|
</programlisting></example>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SECTION See_Also ##### -->
|
<!-- ##### SECTION See_Also ##### -->
|
||||||
<para>
|
<para>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SECTION Stability_Level ##### -->
|
<!-- ##### SECTION Stability_Level ##### -->
|
||||||
|
|
||||||
|
|
||||||
@ -98,7 +96,7 @@ object size used at allocation time is still available when freeing.
|
|||||||
<para>
|
<para>
|
||||||
Allocates a block of memory from the slice allocator.
|
Allocates a block of memory from the slice allocator.
|
||||||
The block adress handed out is guaranteed to be aligned
|
The block adress handed out is guaranteed to be aligned
|
||||||
to at leats 2 * sizeof (void*).
|
to at least 2 * sizeof (void*).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@block_size: the number of bytes to allocate
|
@block_size: the number of bytes to allocate
|
||||||
@ -128,21 +126,8 @@ and the @block_size has to match the size specified upon allocation.
|
|||||||
@mem_block: a pointer to the block to free
|
@mem_block: a pointer to the block to free
|
||||||
@Since: 2.10
|
@Since: 2.10
|
||||||
|
|
||||||
<!-- ##### FUNCTION g_slice_free_chain_with_offset ##### -->
|
|
||||||
<para>
|
|
||||||
Frees a linked list of memory blocks. The memory blocks must be equal-sized,
|
|
||||||
allocated via
|
|
||||||
g_slice_alloc() or g_slice_alloc0()
|
|
||||||
and linked together by a <literal>next</literal> pointer (similar to #GSList)
|
|
||||||
stored in the word of each block denoted by @next_offset.
|
|
||||||
The @block_size has to match the size specified upon allocation.
|
|
||||||
</para>
|
|
||||||
@block_size: the size of the blocks
|
|
||||||
@mem_chain: a pointer to the first block
|
|
||||||
@next_offset: the offset of the <literal>next</literal> pointer
|
|
||||||
@Since: 2.10
|
|
||||||
|
|
||||||
<!-- ##### MACRO g_slice_free_chain ##### -->
|
<!-- ##### FUNCTION g_slice_free_chain ##### -->
|
||||||
<para>
|
<para>
|
||||||
Frees a linked list of memory blocks of structure type @type.
|
Frees a linked list of memory blocks of structure type @type.
|
||||||
The memory blocks must be equal-sized, allocated via
|
The memory blocks must be equal-sized, allocated via
|
||||||
@ -150,10 +135,14 @@ g_slice_alloc() or g_slice_alloc0()
|
|||||||
and linked together by a @next pointer (similar to #GSList). The name of the
|
and linked together by a @next pointer (similar to #GSList). The name of the
|
||||||
@next field in @type is passed as third argument.
|
@next field in @type is passed as third argument.
|
||||||
</para>
|
</para>
|
||||||
@type: the type of the @mem_chain blocks
|
|
||||||
|
@block_size:
|
||||||
@mem_chain: a pointer to the first block of the chain
|
@mem_chain: a pointer to the first block of the chain
|
||||||
@next: the field name of the next pointer in @type
|
@next_offset:
|
||||||
@Since: 2.10
|
@Since: 2.10
|
||||||
|
<!-- # Unused Parameters # -->
|
||||||
|
@type: the type of the @mem_chain blocks
|
||||||
|
@next: the field name of the next pointer in @type
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO g_slice_new ##### -->
|
<!-- ##### MACRO g_slice_new ##### -->
|
||||||
@ -189,6 +178,9 @@ from the slice allocator. It calls g_slice_free1() using
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
@type: the type of the block to free, typically a structure name
|
@type: the type of the block to free, typically a structure name
|
||||||
@mem_block: a pointer to the block to free
|
@mem:
|
||||||
@Since: 2.10
|
@Since: 2.10
|
||||||
|
<!-- # Unused Parameters # -->
|
||||||
|
@mem_block: a pointer to the block to free
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user