From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: SCM_STATIC_ALIGNED_ARRAY Date: Mon, 01 Mar 2010 17:33:27 +0100 Message-ID: <87635ggfxk.fsf@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1267461226 26056 80.91.229.12 (1 Mar 2010 16:33:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 1 Mar 2010 16:33:46 +0000 (UTC) Cc: guile-devel@gnu.org To: "Andy Wingo" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Mar 01 17:33:40 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nm8Yt-0007gp-Q2 for guile-devel@m.gmane.org; Mon, 01 Mar 2010 17:33:40 +0100 Original-Received: from localhost ([127.0.0.1]:53044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nm8Ys-0003fp-UC for guile-devel@m.gmane.org; Mon, 01 Mar 2010 11:33:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nm8Yn-0003fP-Ck for guile-devel@gnu.org; Mon, 01 Mar 2010 11:33:33 -0500 Original-Received: from [140.186.70.92] (port=34563 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nm8Ym-0003et-Kv for guile-devel@gnu.org; Mon, 01 Mar 2010 11:33:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nm8Ym-0004Bg-2R for guile-devel@gnu.org; Mon, 01 Mar 2010 11:33:32 -0500 Original-Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:40033) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nm8Yl-0004BY-TV for guile-devel@gnu.org; Mon, 01 Mar 2010 11:33:32 -0500 X-IronPort-AV: E=Sophos;i="4.49,561,1262559600"; d="scan'208";a="53815457" Original-Received: from laptop-147-210-128-170.labri.fr (HELO nixey) ([147.210.128.170]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 01 Mar 2010 17:33:30 +0100 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 =?iso-8859-1?Q?Vent=F4se?= an 218 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: (Andy Wingo's message of "Mon, 22 Feb 2010 22:03:07 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10004 Archived-At: Hello Andy! "Andy Wingo" writes: > commit cee1d22c3c10b1892c82a5758ef69cd6fc9aba31 > Author: Andy Wingo > Date: Mon Feb 22 23:00:19 2010 +0100 > > actually capture partial continuations [...] > +#ifdef SCM_ALIGNED > +#define SCM_DECLARE_STATIC_ALIGNED_ARRAY(type, sym)\ > +static const type sym[] > +#define SCM_STATIC_ALIGNED_ARRAY(alignment, type, sym)\ > +static SCM_ALIGNED (alignment) const type sym[] > +#else > +#define SCM_DECLARE_STATIC_ALIGNED_ARRAY(type, sym)\ > +static type *sym > +#define SCM_STATIC_ALIGNED_ARRAY(alignment, type, sym) \ > +SCM_SNARF_INIT(sym =3D scm_malloc (sizeof(sym##__unaligned) + alignment = - 1); \ =E2=80=98scm_gc_malloc_pointerless ()=E2=80=99 could be used here. It alwa= ys returns 8-byte aligned areas [0], which should allow some of the alignment twiddling to be removed. What do you think? Also, the indentation, spacing, etc., are not GCS-conforming. Thanks, Ludo=E2=80=99. [0] http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2006-May/001280.html