public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "david.abdurachmanov at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/58065] ARM MALLOC_ABI_ALIGNMENT is wrong Date: Sat, 03 Aug 2013 22:46:00 -0000 [thread overview] Message-ID: <bug-58065-4-p6wDJ9vJHN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-58065-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58065 David Abdurachmanov <david.abdurachmanov at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david.abdurachmanov at gmail dot c | |om --- Comment #5 from David Abdurachmanov <david.abdurachmanov at gmail dot com> --- malloc() [glibc implementation] default alignment is sizeof(long double) or 2 * sizeof(size_t) if I remember correctly, which is 8 bytes for ARMv7. I think, based on C and C++ standard you have to make sure that alignment is good for whatever primitive type, which means alignment size being the size of the biggest primitive type (long double). Reference bug ticket(9 years old): http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15795 Quote from C standard (identical or similar exist in C++): The pointer returned if the allocation succeeds is suitably aligned so that it may be assigned to a pointer to any type of object and then used to access such an object or an array of such objects in the space allocated (until the space is explicitly deallocated).
next prev parent reply other threads:[~2013-08-03 22:46 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-08-02 22:35 [Bug target/58065] New: " bernd.edlinger at hotmail dot de 2013-08-02 22:36 ` [Bug target/58065] " bernd.edlinger at hotmail dot de 2013-08-02 22:38 ` bernd.edlinger at hotmail dot de 2013-08-02 22:39 ` bernd.edlinger at hotmail dot de 2013-08-02 22:43 ` bernd.edlinger at hotmail dot de 2013-08-03 22:46 ` david.abdurachmanov at gmail dot com [this message] 2013-08-05 20:38 ` ramana at gcc dot gnu.org 2013-08-07 7:37 ` bernd.edlinger at hotmail dot de 2013-09-05 12:28 ` clyon at gcc dot gnu.org
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-58065-4-p6wDJ9vJHN@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: linkBe 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).