From: A Soare <alinsoar@voila.fr>
To: "Emacs Help [help-gnu-emacs]" <help-gnu-emacs@gnu.org>
Subject: adress of lisp object is multiple of 8
Date: Tue, 8 May 2007 18:04:10 +0200 (CEST) [thread overview]
Message-ID: <28221415.79501178640250861.JavaMail.www@wwinf4203> (raw)
Here is the definition of a lisp object.
typedef
union Lisp_Object
{
/* Used for comparing two Lisp_Objects;
also, positive integers can be accessed fast this way. */
EMACS_INT i;
struct
{
EMACS_INT val : VALBITS;
enum Lisp_Type type : GCTYPEBITS;
} s;
struct
{
EMACS_UINT val : VALBITS;
enum Lisp_Type type : GCTYPEBITS;
} u;
}
Lisp_Object;
It is memorised on 32 bits. First 3 bits represents the type of object. The others 29 represent a pointer to a structure of that type of object. For example, if adress & 7 is 5, that means that the integer formed of the 29 bits points to a Lisp_Cons.
I do not understand how can I be sure that when the lisp allocs a new space of memory for a given object from enum Lisp_Type, it is allocated to an adress that is multiple of 8 ?
Thanks in advance.
next reply other threads:[~2007-05-08 16:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 16:04 A Soare [this message]
2007-05-08 18:57 ` adress of lisp object is multiple of 8 Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28221415.79501178640250861.JavaMail.www@wwinf4203 \
--to=alinsoar@voila.fr \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).