[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alignment of Lisp_Subr

From: Richard Stallman
Subject: Re: Alignment of Lisp_Subr
Date: Wed, 12 Nov 2003 21:40:22 -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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]