Is it possible to access memory as a block ?

  • Thread starter Pinit Asavanuchit
  • Start date
P

Pinit Asavanuchit

I have a situation to load large amount of data multi-million of data to
memory for processing.
It's memory intensive application. Analysis.

I have found that Hash is too slow, then I try Array but it's overhead
of 20 or 40 byte make me run out of memory.

I try to find how to define a pointer to block of memory or create array
which less overhead.

Is that possible in ruby ?
 
J

Joel VanderWerf

Pinit said:
I have a situation to load large amount of data multi-million of data to
memory for processing.
It's memory intensive application. Analysis.

I have found that Hash is too slow, then I try Array but it's overhead
of 20 or 40 byte make me run out of memory.

I try to find how to define a pointer to block of memory or create array
which less overhead.

Is that possible in ruby ?

What kind of data is it?

Check out mmap:
http://rubyforge.org/projects/mmap/

Also the narray gem and A. Howard's combination of the two:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/162769
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top