public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ignat at gmx dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59898] alignment problems in std::map with avx/avx2
Date: Fri, 24 Jan 2014 19:14:00 -0000	[thread overview]
Message-ID: <bug-59898-4-CBkQ2jCuUS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59898-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59898

--- Comment #5 from ignat at gmx dot net ---
16 overloadable memory allocation functions??? brave new world!

Nothing against the possibility to have explicit alignment (when you need to
align to a cache line, page or disk-block), but why not just do the right thing
and let new return properly aligned pointers by default as it's supposed to do?
Isn't that the idea of using a typed language in the first place?

Unless I have missed something, I thought the whole point of introducing the
alignof operator is exactly to make this possible for user defined allocators.
And of course nothing has ever prevented the builtin new to return properly
aligned pointers as the compiler internally always has this info. Just because
a standard allows to return misaligned pointers to users doesn't mean the
implementation has to.

ignatius


      parent reply	other threads:[~2014-01-24 19:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 11:14 [Bug c++/59898] New: " ignat at gmx dot net
2014-01-21 11:19 ` [Bug c++/59898] " jakub at gcc dot gnu.org
2014-01-23  8:44 ` ignat at gmx dot net
2014-01-23  9:07 ` jakub at gcc dot gnu.org
2014-01-23 10:43 ` glisse at gcc dot gnu.org
2014-01-24 19:14 ` ignat at gmx dot net [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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-59898-4-CBkQ2jCuUS@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.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.
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).