Quote:Original post by nifeQuote:Original post by corrington_j
so, why does it work with a three dim array, is that not contigeous memory. If i made it two array would it maybe work. Also, it used to be a global, non dynamic array, and it worked. Why
A 3 dim array example: float t[3][3][3]. This allocates 3x3 memory chunks of 12 bytes (3 floats) than can be placed anywhere (but it most likely to be placed contigeous), if I'm not mistaken, and therefore it may or may not be contigeous memory.
From a programming point of view, an array of type[n][m]
is a contiguous memory space of n*m*p*sizeof(type) bytes. You can cast this to a type* and iterates in the array as you want. This is different from a type*** - dont do that, please! It's horrific :/
From a system point of view, the memory can be non-contiguous - but then the system is responsible for implementing the mecanisms which may make the program believe that it is a contiguous block (see the "Inside Windows" (now called "Windows Internals") series by Russinovich and Solomon).
Quote:Quoting the msdn:
Typically, a process can access up to 2 GB of memory address space (assuming the /3GB switch was not used), with some of the memory being physical memory and some being virtual memory.
I guess 1.6 GiB is a bit big :) I suggest you to map a disk file - you'll have to provide a good management framework to make it efficient but it will have better chances to succeed.
HTH,