clarified alignment expectations for g_slice_alloc().
authorTim Janik <timj@gtk.org>
Tue, 28 Aug 2007 17:05:13 +0000 (17:05 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 28 Aug 2007 17:05:13 +0000 (17:05 +0000)
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

docs/reference/ChangeLog
docs/reference/glib/tmpl/memory_slices.sgml

index 21afbc0fe4901da6d15aa5cddc38b54e208d1239..6a003d37a014b8c44f4c85f6e8f724dd66e8dccb 100644 (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
index 41f8114a4c10c88d8e6795f13e0d37fb68a21ce8..2538fa16cbd17fc9ea71792efd48ddc2e7f2f617 100644 (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.