This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug manual/315] New: documentation correction for obstack alignment
- From: "eggert at gnu dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 10 Aug 2004 04:45:16 -0000
- Subject: [Bug manual/315] New: documentation correction for obstack alignment
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
2004-08-09 Paul Eggert <eggert@cs.ucla.edu>
* manual/memory.texi (Obstacks Data Alignment): The default
alignment is not 4: it is enough to hold any type of data.
Problem reported by Benno in
<http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
--- memory.texi 2003-02-25 02:10:35 -0800
+++ /home/eggert/junk/memory.texi 2004-08-09 21:39:42 -0700
@@ -1968,7 +1968,8 @@ obstack_next_free (@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).
--
Summary: documentation correction for obstack alignment
Product: glibc
Version: 2.3.3
Status: NEW
Severity: normal
Priority: P2
Component: manual
AssignedTo: roland at gnu dot org
ReportedBy: eggert at gnu dot org
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://sources.redhat.com/bugzilla/show_bug.cgi?id=315
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.