This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Alignment of gfortran allocated arrays


On 14/08/07, François-Xavier Coudert <fxcoudert@gmail.com> wrote:
> Now, if you were to work on a patch for inclusion of a switch for
> controlled-alignment of allocated memory, you would need to:
>   1. add the option itself: what name, what possible values, for which targets?
>   2. add support for front-end emitted malloc calls (there are emitted
> by a unique function: gfc_call_malloc)
>   3. add support to the library routines in libgfortran/runtime/memory.c
>   4. last: add a way for the front-end to communicate the desired
> alignment to the library (to include in set_options, generated from
> the front-end function gfc_generate_function_code)
>
>
> This is not difficult, but not trivial either and has to be thought
> through carefully. Furthermore, it will need reviewing and
> maintaining, which has to be weighted against the use it will have.

(sorry FX, I meant to reply to the list only)

Hi all, thanks for your quick responses.

After reading through the thread, it looks as if the LD_PRELOAD method
is the easiest and quickest to setup, so I'll try this for now.
However, when I've got my thesis out of the way (at last, probably by
the end of September) I might look at preparing a patch as you
describe above. It would be a learning experience for me at least.

Thanks for your help,
John


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]