From: Goswin von Brederlow <goswin-v-b@web.de>
To: Pascal Cuoq <Pascal.Cuoq@cea.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Alignment of data
Date: Wed, 27 Jan 2010 22:01:51 +0100 [thread overview]
Message-ID: <873a1rntxc.fsf@frosties.localdomain> (raw)
In-Reply-To: <F65E4E9D-6D00-4F37-8494-806E942E9028@cea.fr> (Pascal Cuoq's message of "Wed, 27 Jan 2010 17:38:13 +0100")
Pascal Cuoq <Pascal.Cuoq@cea.fr> writes:
> Goswin von Brederlow <goswin-v-b@web.de> wrote:
>
>
> You need to write a new function
>
> CAMLextern value caml_alloc_double_array (mlsize_t),
>
> or similar that ensures alignment on 8 byte for double even for 32bit
> systems.
>
> You should also check the CAMLextern value caml_copy_double (double);
> that it does the same.
>
>
> If you decide to go this route, which this message
> neither endorses not condemns, you also need to
>
> A1/ allocate the doubles directly in the major heap, and
> A2/ deactivate compactions
>
> or
>
> B/ modify the garbage-collector.
>
> Pascal
Doubles are tagged with Double_tag and arrays of doubles with
Double_array_tag. So the GCC knows where doubles are.
Would it be hard to patch the allocation to leave a 4 byte gap in the
minor heap when needed to align doubles and patch the compation to do
the same?
The 4 bytes would mean inserting an Atom(0) during allocation and
compaction. Not the nicest way to do this but should be simple to patch
in.
MfG
Goswin
next prev parent reply other threads:[~2010-01-27 21:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100127161719.C6A10BC37@yquem.inria.fr>
2010-01-27 16:38 ` Pascal Cuoq
2010-01-27 21:01 ` Goswin von Brederlow [this message]
2010-01-27 12:03 Christophe Papazian
2010-01-27 15:26 ` [Caml-list] " Goswin von Brederlow
2010-01-27 16:15 ` Xavier Leroy
2010-01-27 17:20 ` Christophe Papazian
2010-01-27 17:56 ` Richard Jones
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=873a1rntxc.fsf@frosties.localdomain \
--to=goswin-v-b@web.de \
--cc=Pascal.Cuoq@cea.fr \
--cc=caml-list@yquem.inria.fr \
/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