comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: dynamic memory in call_external
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: dynamic memory in call_external [message #14170 is a reply to message #14157] Tue, 26 January 1999 00:00 Go to previous messageGo to previous message
korpela is currently offline  korpela
Messages: 59
Registered: September 1993
Member
In article <88lnirufne.fsf@catspaw.jpl.nasa.gov>,
Vapuser <vapuser@catspaw.jpl.nasa.gov> wrote:
>
> Is it advisable to create and destroy memory within a CALL_EXTERNAL
> routine? (that is, can one safely use malloc and free?)

These are actually two separate questions. The answer to the second is
"yes," one can safely use malloc and free from a call_external routine.
IDL uses malloc and free for its memory allocations (at least in the
UNIX versions). The answer to the first question is "maybe not." Some
of the RSI domeumentation claims that this can lead to more memory
fragmentation than using IDL's allocation routines would. However I
cannot easily imagine a case in which this would happen, unless IDL
depends upon behavior of realloc that is not guaranteed to occur.

> Secondly, can one create an array in IDL (in the interpreter) that
> is page aligned (i.e. as if one had done it using the 'valloc' version
> of malloc in C) which can then be passed down into the CALL_EXTERNAL
> routine.

Not that I am aware of.

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>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Concurrent CORBA calls
Next Topic: Check mark on menu bar pull down item?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:16:05 PDT 2025

Total time taken to generate the page: 0.00376 seconds