Thread: Allocating a number of large 3d arrays in C

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    5
    Now, do you have an OS and a machine capable of dealing with 3GB+ of allocated memory?
    32-bit windows won't do it for sure.
    Running this on Vista Ultimate 64 and with 4GB of Ram, I've also tried this on a Ubuntu 64 machine with the same, no dice on either machine.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Surrender View Post
    Running this on Vista Ultimate 64 and with 4GB of Ram, I've also tried this on a Ubuntu 64 machine with the same, no dice on either machine.
    Are you actually compiling for 64-bit, or are you using a 32-bit executable?

    Also, with 4GB of RAM, how much ACTUAL RAM do you have, and how much swap-space?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    5
    Firstly, thanks for all the feedback folks.

    Why do you need 30 of them at the same time?
    I'm running an electromagnetic simulation. It's a 'leapfrog' algorithm, so each iteration of my code relies on the previous one and all arrays are required.

    Are you actually compiling for 64-bit, or are you using a 32-bit executable?

    Also, with 4GB of RAM, how much ACTUAL RAM do you have, and how much swap-space?
    I don't know how to compile for 64 bit, I'm rusty with c. Can anyone help me with this?

    I can use up to 4.029 GB of Ram, according to the task manager.
    Page File is 4.039 GB

    I might give MAT's linked list idea a go and see what happens.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. memory issue
    By t014y in forum C Programming
    Replies: 2
    Last Post: 02-21-2009, 12:37 AM
  2. Looking for constructive criticism
    By wd_kendrick in forum C Programming
    Replies: 16
    Last Post: 05-28-2008, 09:42 AM
  3. Allocating Arrays on the Free Store
    By evilkillerfiggi in forum C++ Programming
    Replies: 2
    Last Post: 12-05-2005, 04:02 PM
  4. 3D or 4D arrays
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 02-25-2002, 06:02 PM
  5. Array of boolean
    By DMaxJ in forum C++ Programming
    Replies: 11
    Last Post: 10-25-2001, 11:45 PM