Is it possible to access memory as a block ?

Discussion in 'Ruby' started by Pinit Asavanuchit, Aug 8, 2010.

  1. 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 ?
    --
    Posted via http://www.ruby-forum.com/.
     
    Pinit Asavanuchit, Aug 8, 2010
    #1
    1. Advertising

  2. Pinit Asavanuchit wrote:
    > 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
     
    Joel VanderWerf, Aug 8, 2010
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fernando Lopes
    Replies:
    0
    Views:
    861
    Fernando Lopes
    Mar 29, 2005
  2. Greg Copeland

    access to preallocated block of memory?

    Greg Copeland, Dec 14, 2005, in forum: Python
    Replies:
    14
    Views:
    588
    Greg Copeland
    Dec 16, 2005
  3. morrell
    Replies:
    1
    Views:
    966
    roy axenov
    Oct 10, 2006
  4. Torben Laursen

    Block access to zip files using access rules

    Torben Laursen, May 12, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    431
    bruce barker
    May 12, 2008
  5. Jess
    Replies:
    0
    Views:
    117
Loading...

Share This Page