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

Home » Public Forums » archive » 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
The best way to keep data in RAM / object-oriented programming [message #68788] Thu, 03 December 2009 07:44
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi gurus,

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 ?

Thanks in advance,
nata
[Message index]
 
Read Message
Previous Topic: match_3d.pro
Next Topic: How 2 extract LOCAL Max?

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

Current Time: Fri Oct 10 08:34:36 PDT 2025

Total time taken to generate the page: 0.05986 seconds