clarified alignment expectations for g_slice_alloc().

Tue Aug 28 19:04:12 2007  Tim Janik  <timj@gtk.org>                                                                                                           
                                                                                                                                                              
        * glib/tmpl/memory_slices.sgml: clarified alignment                                                                                                   
        expectations for g_slice_alloc().                                                                                                                     
                                                                                                                                                              


svn path=/trunk/; revision=5724
This commit is contained in:
Tim Janik 2007-08-28 17:05:13 +00:00 committed by Tim Janik
parent e719474ee5
commit b3e7ac276e
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Tue Aug 28 19:04:12 2007 Tim Janik <timj@gtk.org>
* glib/tmpl/memory_slices.sgml: clarified alignment
expectations for g_slice_alloc().
2007-08-20 Behdad Esfahbod <behdad@gnome.org>
* glib/tmpl/unicode.sgml: Document that GUnicodeScript is

View File

@ -95,8 +95,11 @@ object size used at allocation time is still available when freeing.
<!-- ##### FUNCTION g_slice_alloc ##### -->
<para>
Allocates a block of memory from the slice allocator.
The block adress handed out is guaranteed to be aligned
to at least <literal>2 * sizeof (void*)</literal>.
The block adress handed out can be expected to be aligned
to at least <literal>1 * sizeof (void*)</literal>,
though in general slices are 2 * sizeof (void*) bytes aligned,
if a malloc() fallback implementation is used instead,
the alignment may be reduced in a libc dependent fashion.
Note that the underlying slice allocation mechanism can
be changed with the <link linkend="G_SLICE">G_SLICE=always-malloc</link>
environment variable.