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

Home » Public Forums » archive » Re: The best way to keep data in RAM / object-oriented programming
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: The best way to keep data in RAM / object-oriented programming [message #68787 is a reply to message #68786] Thu, 03 December 2009 09:09 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
nata wites:

>
> My application needs a lot of RAM so I have to improve a solution in
> order to to use less resources.
> Normally, when I've an object I use declarations like this:
>
> pro myobject__define
> struct = { myobject, $
> data: ptr_new() }
> end
>
> Now for example if my object has to save an array like FLTARR
> (400,400,24,97) I will use the data pointer to store this array. The
> problem is that if I do this I take a lot of computer resources. With
> this example:
> help, /mem
> aa=fltarr(400,400,24,97)
> myobject->SetProperty, DATA=aa
> aa=0l
> help, /mem
>
> IDl returns:
> heap memory used: 658906, max: 805215874, gets: 1195,
> frees: 387
> heap memory used: 1490578946, max: 1490579037, gets: 1207,
> frees: 398
>
> So, only for this example I'm using 1.4 Gb aprox. I tried to used
> ASSOC procedure but I didn't succeed.... Some suggestions or comments
> about how to reduce the memory ? There is a method to store compressed
> data or something similar ?

I think I would learn how to put data into a pointer without
making a copy of it:

http://www.dfanning.com/misc_tips/pointers.html

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ASSOC vs SHMMAP vs POINT_LUNs vs READ_BINARY?
Next Topic: Re: ASSOC vs SHMMAP vs POINT_LUNs vs READ_BINARY?

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

Current Time: Fri Oct 10 07:19:31 PDT 2025

Total time taken to generate the page: 1.19383 seconds