Find the answer to your Linux question:
Results 1 to 3 of 3
guys i want to make an array[1000 000 000 ] using c++ , g++ ,with total memory 3 giga and used memory 1.5 giga kernel 2.6.27 fc10 i tried to ...
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    65

    long long array

    guys i want to make an array[1000 000 000 ]
    using c++ , g++ ,with total memory 3 giga and used memory 1.5 giga
    kernel 2.6.27 fc10

    i tried to allocate it statically and dynamically but in both failed ?
    statically , stated compile error saying error size is too large ,
    dynamically ,at run time it throw std:bad_alloc

    any idea on how to solve that ?

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Could you show us an example of the code...Gerard4143
    Make mine Arch Linux

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    65
    gerard4143 thx
    i figured it out , i can't allocate that amount of memory on that pc , so i thought about something else and it worked , thx

Posting Permissions

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