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

Home » Public Forums » archive » Re: HELP,/MEMORY --example
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: HELP,/MEMORY --example [message #4976] Fri, 01 September 1995 00:00
Russ Welti is currently offline  Russ Welti
Messages: 27
Registered: October 1994
Junior Member
Upon further thought I decided that the number of calls
to MALLOC and FREE would not be expected to be the same (!)
but I still have doubt that the figures can be very
useful. Here's why:

ENTER IDL>
heap memory in use: 73526, calls to MALLOC: 111, FREE: 15
IDL> a=intarr(1)
heap memory in use: 73671, calls to MALLOC: 114, FREE: 15
IDL> b=fltarr(300)
heap memory in use: 75014, calls to MALLOC: 117, FREE: 15
IDL> h=handle_create()
heap memory in use: 76053, calls to MALLOC: 120, FREE: 15
IDL> handle_value,h,a,/set
heap memory in use: 76208, calls to MALLOC: 123, FREE: 15
IDL> a="hello"
heap memory in use: 76197, calls to MALLOC: 126, FREE: 16
IDL> delvar,a
heap memory in use: 76229, calls to MALLOC: 129, FREE: 18

Creating any variable/handle involved 3 calls to malloc.
Reassigning an existing variable also had 3 calls to malloc,
and 1 call to free.
Deleting existing variable shows the same 3 calls to malloc,
and 2 calls to free.

I'm sure there's precise reasons why I see these figures, but
my contention is that a developer without insight into what
the expected patterns should be, cannot make use of these
statistics for very much...

Any thoughts?

Russ Welti rwelti@u.washington.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Bug (still) in NR_QROMB, QROMB
Next Topic: Contract Programmer in IDL or PV-Wave Wanted

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

Current Time: Wed Oct 08 17:58:02 PDT 2025

Total time taken to generate the page: 0.00495 seconds