unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Alignment of Lisp_Subr
Date: Wed, 12 Nov 2003 21:40:22 -0500	[thread overview]
Message-ID: <E1AK7PC-0001dq-PS@fencepost.gnu.org> (raw)
In-Reply-To: <jwv8ymld1jm.fsf-monnier+emacs/devel@vor.iro.umontreal.ca> (message from Stefan Monnier on 12 Nov 2003 11:22:33 -0500)

    - Structures of type Lisp_Subr are statically allocated and are not
      guaranteed to be aligned on a multiple of 8.  I currently solve this
      by adding __attributes__ ((__aligned__ (8))), but this only works for GCC
      AFAIK.  The only alternative I can think of is to add a padding field
      to Lisp_Subr and when its address is not a multiple of 8, memmove it
      by a few bytes (I think `defsubr' is the only place where we refer
      to these statically allocated Sfoo variables).
      Any comment on which approach is preferable ?

Subr objects are allocated statically, but I don't think anything
requires that.  There is no harm in copying the data to some new,
properly-aligned block of memory and using that block instead.

      parent reply	other threads:[~2003-11-13  2:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-12 16:22 Alignment of Lisp_Subr Stefan Monnier
2003-11-12 23:30 ` Miles Bader
2003-11-13 16:18   ` Stephen J. Turnbull
2003-11-14  5:23     ` Gaute B Strokkenes
2003-11-14 11:28       ` Stephen J. Turnbull
2003-11-16 10:25         ` Gaute B Strokkenes
2003-11-13  2:40 ` Richard Stallman [this message]

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=E1AK7PC-0001dq-PS@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).