Re: memory allocation for structure arrays [message #11584 is a reply to message #11583] |
Thu, 30 April 1998 00:00  |
korpela
Messages: 59 Registered: September 1993
|
Member |
|
|
In article <3547B2B8.5220E8F6@ngdc.noaa.gov>,
Ian Sprod <ian@ngdc.noaa.gov> wrote:
>
> Does anyone know exactly how IDL allocates memory for structures?
>
I'm not sure exactly how it does, but it should...
1) create a structure definition
2) allocate a block of memory for the structure data
3) assign the data block and structure definition to to the variable.
> Should I be using an associative array to do this?
Probably, but I hate ASSOC. I've got my own memory mapped files
IDL routine that I use for large files. It doesn't yet work
with structures, but works fine with normal arrays. I've never
tried it on linux, but it should work with very little modification.
(The only modification that probably need to be made is that some of
the include files reside in a different location on Linux systems vs
SunOS system). The program and instructions for use reside at
http://sag-www.ssl.berkeley.edu/~korpela/mmap/
Eric
--
Eric Korpela | An object at rest can never be
korpela@ssl.berkeley.edu | stopped.
<a href="http://sag-www.ssl.berkeley.edu/~korpela">Click for home page.</a>
|
|
|