469,268 Members | 996 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

array size. out of memory exception.

I'm sorry if this question has been asked before, but is it possible
to define a 2 D array of type double with dimensions of the order
65536 x 65536 ?
I'm working on a face recognition algorithm called PCA (Principal
component analysis), and at an intermediate stage, I need to work with
arrays of the above dimension.

Is it possible? I get a System out of memory exception for 65536x65536
And for arrays of size 10000 x 10000, the program runs really slow due
to virtual memory demands. Is there a work around for the problem?

Thanks a lot

Joel

Feb 15 '07 #1
4 3817
"Joel" <jo*******@gmail.comwrote in message
news:11**********************@s48g2000cws.googlegr oups.com...
I'm sorry if this question has been asked before, but is it possible
to define a 2 D array of type double with dimensions of the order
65536 x 65536 ?
I'm working on a face recognition algorithm called PCA (Principal
component analysis), and at an intermediate stage, I need to work with
arrays of the above dimension.

Is it possible? I get a System out of memory exception for 65536x65536
And for arrays of size 10000 x 10000, the program runs really slow due
to virtual memory demands. Is there a work around for the problem?

Thanks a lot

Joel

Feb 15 '07 #2
"Joel" <jo*******@gmail.comwrote in message
news:11**********************@s48g2000cws.googlegr oups.com...
I'm sorry if this question has been asked before, but is it possible
to define a 2 D array of type double with dimensions of the order
65536 x 65536 ?
I'm working on a face recognition algorithm called PCA (Principal
component analysis), and at an intermediate stage, I need to work with
arrays of the above dimension.
You can't have arrays larger than 2GB in .NET. (both 32 and 64 bit)
Is it possible? I get a System out of memory exception for 65536x65536
And for arrays of size 10000 x 10000, the program runs really slow due
to virtual memory demands. Is there a work around for the problem?
No, not using managed array's (see above), you could use unmanaged array's larger than 2GB,
but this would require 64 bit hardware with +32GB RAM and a 64 bit OS.
10000*10000 double arrays shouldn't be a problem on 32 bit systems having +1GB of RAM
preferably 2GB.

Willy.

Feb 15 '07 #3
would it really be impossible to store this in a database?


On Feb 15, 9:48 am, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.bewrote:
"Joel" <joelag...@gmail.comwrote in message

news:11**********************@s48g2000cws.googlegr oups.com...I'm sorry if this question has been asked before, but is it possible
to define a 2 D array of type double with dimensions of the order
65536 x 65536 ?
I'm working on a face recognition algorithm called PCA (Principal
component analysis), and at an intermediate stage, I need to work with
arrays of the above dimension.

You can't have arrays larger than 2GB in .NET. (both 32 and 64 bit)
Is it possible? I get a System out of memory exception for 65536x65536
And for arrays of size 10000 x 10000, the program runs really slow due
to virtual memory demands. Is there a work around for the problem?

No, not using managed array's (see above), you could use unmanaged array's larger than 2GB,
but this would require 64 bit hardware with +32GB RAM and a 64 bit OS.
10000*10000 double arrays shouldn't be a problem on 32 bit systems having +1GB of RAM
preferably 2GB.

Willy.

Feb 15 '07 #4
Joel wrote:
I'm sorry if this question has been asked before, but is it possible
to define a 2 D array of type double with dimensions of the order
65536 x 65536 ?
I'm working on a face recognition algorithm called PCA (Principal
component analysis), and at an intermediate stage, I need to work with
arrays of the above dimension.

Is it possible? I get a System out of memory exception for 65536x65536
And for arrays of size 10000 x 10000, the program runs really slow due
to virtual memory demands. Is there a work around for the problem?

Thanks a lot

Joel
Do you really have to work with the entire image at once? I haven't done
any pattern recognition myself, but I would imagine that you would
always compare pixels that are close together.

Photoshop, for example, uses a swapfile to store the image data that is
not in memory. If you have a large enough image, it will never be
entirely in memory at once.

--
Göran Andersson
_____
http://www.guffa.com
Feb 16 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Arthur Sinko | last post: by
10 posts views Thread by Ramprasad A Padmanabhan | last post: by
11 posts views Thread by D | last post: by
7 posts views Thread by simkn | last post: by
18 posts views Thread by toton | last post: by
5 posts views Thread by =?Utf-8?B?QXlrdXQgRXJnaW4=?= | last post: by
10 posts views Thread by Scott Townsend | last post: by
2 posts views Thread by yeshello54 | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.