From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: A Soare Newsgroups: gmane.emacs.help Subject: adress of lisp object is multiple of 8 Date: Tue, 8 May 2007 18:04:10 +0200 (CEST) Message-ID: <28221415.79501178640250861.JavaMail.www@wwinf4203> Reply-To: alinsoar@voila.fr NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1178640288 11497 80.91.229.12 (8 May 2007 16:04:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 May 2007 16:04:48 +0000 (UTC) To: "Emacs Help [help-gnu-emacs]" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 08 18:04:41 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HlSB7-0003zu-8m for geh-help-gnu-emacs@m.gmane.org; Tue, 08 May 2007 18:04:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HlSID-0001nA-67 for geh-help-gnu-emacs@m.gmane.org; Tue, 08 May 2007 12:12:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HlSHo-0001bq-Sn for help-gnu-emacs@gnu.org; Tue, 08 May 2007 12:11:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HlSHm-0001a4-57 for help-gnu-emacs@gnu.org; Tue, 08 May 2007 12:11:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HlSHl-0001Zq-Bm for help-gnu-emacs@gnu.org; Tue, 08 May 2007 12:11:33 -0400 Original-Received: from smtp3.voila.fr ([193.252.22.173]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HlSAe-0005BL-FJ for help-gnu-emacs@gnu.org; Tue, 08 May 2007 12:04:12 -0400 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf4203.voila.fr (SMTP Server) with ESMTP id E1E3C1C00082 for ; Tue, 8 May 2007 18:04:10 +0200 (CEST) Original-Received: from wwinf4203 (wwinf4203 [10.232.2.30]) by mwinf4203.voila.fr (SMTP Server) with ESMTP id D50201C00081 for ; Tue, 8 May 2007 18:04:10 +0200 (CEST) X-ME-UUID: 20070508160410872.D50201C00081@mwinf4203.voila.fr X-Originating-IP: [89.34.170.37] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-REPLYTO: |~| X-detected-kernel: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:43811 Archived-At: 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.