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 #14157] Tue, 26 January 1999 00:00 Go to previous message
Vapuser is currently offline  Vapuser
Messages: 63
Registered: November 1998
Member
David Foster <foster@bial1.ucsd.edu> writes:

Thanks to all that answered. I should've been a little more clear in
the question, however. The variables that will be created in this
person's routine will be local to the CALL_EXTERNAL routine and will
be passed neither into nor out of the routine. Looks like the answer
to the first question is 'yes' provided that the error handling always
assures that the memory is returned in case of error. I suspected the
answer to the second was 'no' and am confirmed in that answer.

WHD


> Vapuser wrote:
>>
>> I have someone in my office who wants to know:
>>
>> Is it advisable to create and destroy memory within a CALL_EXTERNAL
>> routine? (that is, can one safely use malloc and free?) Or must one
>> make the routine(s) in question LINKIMAGE routines and the idl memory
>> management routines (IDL_MEMAlloc, IDL_MEMfree and IDL_GetScratch)
>> available in that environment.
>
> I have used [m|c]alloc() and free() in CALL_EXTERNAL modules with no
> problems, usually for relatively small chunks of memory. But of course
> this is only for variables within the C module; you can't allocate
> memory within the C module and pass it back to IDL.
>
> Dave
> --
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
> David S. Foster Univ. of California, San Diego
> Programmer/Analyst Brain Image Analysis Laboratory
> foster@bial1.ucsd.edu Department of Psychiatry
> (619) 622-5892 8950 Via La Jolla Drive, Suite 2240
> La Jolla, CA 92037
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[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 17:14:31 PDT 2025

Total time taken to generate the page: 0.00395 seconds