Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User stavrospapa's Avatar
    Join Date
    Sep 2008
    Posts
    144
    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.

    thanks!
    Stavros

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    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 amitkankani's Avatar
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572
    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 C++
    Replies: 5
    Last Post: 2010-10-19, 12:07
  2. 2D array class over-ride = operator
    By s4028469 in forum Symbian C++
    Replies: 6
    Last Post: 2007-09-01, 09:56
  3. How to copy pointer to array?
    By chrishawaii in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved