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

Home » Public Forums » archive » Re: Bug in STRMID system routine
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: Bug in STRMID system routine [message #82473] Thu, 13 December 2012 12:04 Go to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
Hi David.

On Thu, 13 Dec 2012 12:48:04 -0700, David Fanning wrote:

> The last example, though, completely and utterly locked up
> my machine. No Task Manager, no nothing, requiring a hard
> reboot and cost me about an hour's worth of work. Not too
> excited about that. :-(
>
Sorry for that. Here I get a simple error message, that IDL is unable
to allocate memory. I would have told, if there were serious problems.

Here is the complete output:

IDL> strmid_demo
% Compiled module: STRMID_DEMO.

Starting with:
heap memory used: 728889, max: 753748, gets: 1078, frees:
238

The string needs about 10485760 bytes:
heap memory used: 11214886, max: 53158085, gets: 1083, frees:
241

A small substring needs the same amount of memory as the original
string:
heap memory used: 21707071, max: 21707071, gets: 1087, frees:
242

The memory can be released by a simple operation:
heap memory used: 11221313, max: 21707082, gets: 1088, frees:
243

The following is slow, but works:
heap memory used: 11276405, max: 21762174, gets: 3090, frees:
1243

... and this probably runs into a memory allocation error (if you
don't have tons of RAM):
% Unable to allocate memory: to duplicate string.
Not enough space
% Execution halted at: STRMID_DEMO 29
F:\home\idl\comp.lang.idl-pvwave\strmid_demo.pro
% $MAIN$
IDL>

Cheers, Heinz
[Message index]
 
Read Message
Read Message
Previous Topic: Bug in STRMID system routine
Next Topic: array manipulation (TOTAL-ing or MEDIAN-ing) in uneven bins

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

Current Time: Wed Oct 08 20:02:55 PDT 2025

Total time taken to generate the page: 0.00492 seconds