Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2008

    Array of 6 million doubles

    Dear Devs,

    (it may sound crazy)
    Need to create dynamically an array of 6 million double numbers
    that will be loaded from a resource file, so that to keep the exe small.

    I went thru the posts, still need a good starting tip on how
    to approach this issue.


  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: Array of 6 million doubles

    On double you probably mean TReal, a 64-bit (8-byte) number. 6 million is around 6 "mega", 6*8=48, so you would need around 48 megabytes of memory for that. Most current devices do not have such amount of free memory.
    Otherwise you can either use TPckg/Buf<TReal>+RFile::Read or RFileReadStream::ReadReal64L for reading TReal-s from files.

  3. #3
    Nokia Developer Champion
    Join Date
    Oct 2006
    Bangalore, India

    Re: Array of 6 million doubles

    well if the program logic premits, instead of reading the entire array... it would be a better idea to read a portion and work on it and keep the array always sorted....

    other wise this is mostly impossible, as to get so much heap...
    Amit Kankani
    Nokia Developer Champion

Similar Threads

  1. Grid app is crashing... need urgent help...
    By shankha in forum Symbian
    Replies: 5
    Last Post: 2010-10-19, 12:07
  2. 2D array class over-ride = operator
    By s4028469 in forum Symbian
    Replies: 6
    Last Post: 2007-09-01, 09:56
  3. How to copy pointer to array?
    By chrishawaii in forum Symbian
    Replies: 10
    Last Post: 2006-06-06, 12:08
  4. Replies: 5
    Last Post: 2006-02-26, 17:29
  5. Replies: 2
    Last Post: 2005-03-14, 15:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts