Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #126771

Re: Aligned Issue when malloc()

From Egor <egor@ruby.local>
Newsgroups comp.lang.c
Subject Re: Aligned Issue when malloc()
Date 2018-02-16 02:48 +0200
Organization Aioe.org NNTP Server
Message-ID <kbmhle-otd.ln1@ruby.opensrc.club> (permalink)
References (5 earlier) <3c435029-fc0c-4753-ab8e-8e81342ea09e@googlegroups.com> <pan0le-i1a.ln1@ruby.opensrc.club> <fd4834cc-971c-4c3c-8832-c831fa36501a@googlegroups.com> <cvsgle-dac.ln1@ruby.opensrc.club> <27b32f98-ef45-4b81-95fd-0ea261468689@googlegroups.com>

Show all headers | View raw


supercat@casperkitty.com wrote:
> How about an interpreter for a language which includes that data type, and
> which might need to maintain a "stack" [seem by the interpreted code] which
> includes that data type?
Any alignment would do, as I'd doubt there are any systems with 80-bit
reals *and* with strict alignment, so it will be only an issue of
performance, and even then it wouldn't be that bad.

There are two options:
- 64-bit alignment. Memory buses on modern PCs are 64-bit, so having a
  bigger alignment than that would be a waste.
- 40-byte alignment. Least common multiple between 64-bit and 80-bit.
  This is the generic approach that doesn't treat long double
  differently from other types.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Aligned Issue when malloc() hwding <m@amastigote.com> - 2018-02-06 01:17 -0800
  Re: Aligned Issue when malloc() Ian Collins <ian-news@hotmail.com> - 2018-02-06 22:41 +1300
  Re: Aligned Issue when malloc() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-02-06 11:52 +0000
    Re: Aligned Issue when malloc() hwding <m@amastigote.com> - 2018-02-06 04:35 -0800
      Re: Aligned Issue when malloc() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-02-06 13:48 +0000
        Re: Aligned Issue when malloc() "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-02-06 12:55 -0800
      Re: Aligned Issue when malloc() Richard Damon <Richard@Damon-Family.org> - 2018-02-06 08:52 -0500
        Re: Aligned Issue when malloc() "James R. Kuyper" <jameskuyper@verizon.net> - 2018-02-06 09:59 -0500
          Re: Aligned Issue when malloc() supercat@casperkitty.com - 2018-02-06 07:20 -0800
            Re: Aligned Issue when malloc() Robert Wessel <robertwessel2@yahoo.com> - 2018-02-06 11:50 -0600
            Re: Aligned Issue when malloc() Keith Thompson <kst-u@mib.org> - 2018-02-06 11:34 -0800
            Re: Aligned Issue when malloc() Egor <egor@ruby.local> - 2018-02-09 16:20 +0200
              Re: Aligned Issue when malloc() supercat@casperkitty.com - 2018-02-15 08:56 -0800
                Re: Aligned Issue when malloc() Egor <egor@ruby.local> - 2018-02-15 19:35 +0200
                Re: Aligned Issue when malloc() supercat@casperkitty.com - 2018-02-15 11:27 -0800
                Re: Aligned Issue when malloc() Egor <egor@ruby.local> - 2018-02-16 02:48 +0200
                Re: Aligned Issue when malloc() supercat@casperkitty.com - 2018-02-16 08:49 -0800
      Re: Aligned Issue when malloc() "James R. Kuyper" <jameskuyper@verizon.net> - 2018-02-06 09:41 -0500

csiph-web