[Top][All Lists]

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

Re: Emacs-26 threads problem [win64]

From: Eli Zaretskii
Subject: Re: Emacs-26 threads problem [win64]
Date: Sun, 15 Oct 2017 18:14:27 +0300

> Cc: address@hidden, address@hidden
> From: Paul Eggert <address@hidden>
> Date: Sat, 14 Oct 2017 15:51:21 -0700
> Eli Zaretskii wrote:
> > You are saying that some member of struct thread_state, probably
> > m_getcjmp, has a 16-byte alignment, at least in the 64-bit Windows
> > build.  GCC sees that, and therefore deduces that the entire struct
> > must be 16-byte aligned, so it feels free to emit movaps in
> > conjunction with the m_stack_bottom member, which is at offset 64
> > (decimal) from the struct base, and therefore should also be 16-byte
> > aligned.  Is that correct?
> Yes.


OOC, when a program does

  struct foo *ptr = malloc (sizeof struct foo);

how is the alignment of the resulting pointer arranged to be "the
maximum of the struct members"?  The malloc function only sees the
size of the requested memory, it doesn't know anything about the
members.  But if malloc is not guaranteed to produce a suitably
aligned memory chunk, then GCC cannot issue instructions requiring
struct members to be aligned.

reply via email to

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