Layout in memory

From: David Sagan (dcs16_at_cornell.edu.deletethis)
Date: 07/31/04


Date: Fri, 30 Jul 2004 23:36:25 -0400

Hello:

I want to pass structures between F95 and C and one way I thought of
doing it was to create a structure that had the same layout in memory on
both the Fortran side and the C side.

I did a little testing and I see that this works but my question is can
I count on different compilers on the *same* platform laying out the
same structure in the same way in memory? (I know I cannot count on the
memory layout to be the same on different platforms). For example, if I
had the structure:

type this_type
  real abc
  type (sub_type) xyz
  ... etc.
end type

Will on linux, say, the NAG and Lahey compilers create the same memory
layout for this structure?

         -- Thanks for any help, David Sagan



Relevant Pages

  • Re: Like some others: no to D2005 and back to D7
    ... integrated layout much better than the floating one especially since I ... can always have the Project manager visible. ... I really don't care how much memory Delphi needs. ... wait for the form designer to appear: I'm not sure if this wait really ...
    (borland.public.delphi.non-technical)
  • Re: Has anyone noticed Word performance improvements with Tiger
    ... So I don't know that a memory boost is going to do very ... > balloons, and I don't recall being unhappy. ... Two of those things are certainly Page Layout View and Track ... > Changes balloons, especially the balloons. ...
    (microsoft.public.mac.office.word)
  • Re: Generic Package
    ... Memory layout defines an order. ... an "unordered set" is simply a set with no defined order. ... reason to consider such forms or worry about their properties. ...
    (comp.lang.ada)
  • Re: Implementing Legacy Byte Packed Message Interfaces
    ... > The layout of bitfields is almost totally non-portable. ... > requirement is that they appear in memory in the same order as they do in the ... > (All the above, of course, is true for C structs in general, but bitfields are ...
    (comp.lang.java.programmer)
  • Re: RX4640
    ... > layout is sparse. ... > because currently we allocate a vm_page array that needs to be ... When a machine has only 2BG of memory, ... I think I'm gonna wait for some time until you guys will fix it ...
    (freebsd-hackers)