aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /manual/memory.texi
parentTest for stack alignment. (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.bz2
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'manual/memory.texi')
-rw-r--r--manual/memory.texi13
1 files changed, 8 insertions, 5 deletions
diff --git a/manual/memory.texi b/manual/memory.texi
index 91abb7f5d4..91b9d84eb2 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -948,7 +948,7 @@ program.
#include <malloc.h>
/* Prototypes for our hooks. */
-static void *my_init_hook (void);
+static void my_init_hook (void);
static void *my_malloc_hook (size_t, const void *);
static void my_free_hook (void*, const void *);
@@ -984,7 +984,7 @@ my_malloc_hook (size_t size, const void *caller)
return result;
@}
-static void *
+static void
my_free_hook (void *ptr, const void *caller)
@{
/* Restore all old hooks */
@@ -1968,7 +1968,8 @@ obstack_next_free (@var{obstack-ptr}) - obstack_base (@var{obstack-ptr})
Each obstack has an @dfn{alignment boundary}; each object allocated in
the obstack automatically starts on an address that is a multiple of the
-specified boundary. By default, this boundary is 4 bytes.
+specified boundary. By default, this boundary is aligned so that
+the object can hold any type of data.
To access an obstack's alignment boundary, use the macro
@code{obstack_alignment_mask}, whose function prototype looks like
@@ -1980,7 +1981,9 @@ this:
The value is a bit mask; a bit that is 1 indicates that the corresponding
bit in the address of an object should be 0. The mask value should be one
less than a power of 2; the effect is that all object addresses are
-multiples of that power of 2. The default value of the mask is 3, so that
+multiples of that power of 2. The default value of the mask is a value
+that allows aligned objects to hold any type of data: for example, if
+its value is 3, any type of data can be stored at locations whose
addresses are multiples of 4. A mask value of 0 means an object can start
on any multiple of 1 (that is, no alignment is required).
@@ -2384,7 +2387,7 @@ exceed the process' data storage limit.
@comment unistd.h
@comment BSD
-@deftypefun int sbrk (ptrdiff_t @var{delta})
+@deftypefun void *sbrk (ptrdiff_t @var{delta})
This function is the same as @code{brk} except that you specify the new
end of the data segment as an offset @var{delta} from the current end
and on success the return value is the address of the resulting end of