out of memory error when creating large matrix

hello,

i have to create a matrix of 100000 cols and 10000 rows for store numeric values, 0 and 1, but when the program is executing , the error "outofmemory no stack trace available" appear.

縣ow can I resolve this? Is neccesary to modify the JVM?

Urgent !!!!!!!!!!!!!!!

Thanks in advance.

[319 byte] By [SandraTTa] at [2007-10-2 12:43:24]
# 1

Which is 125 MiB of memory, minimum.

So you're going to have to do two things to make this work well. First, find out what a BitSet is and use it. Second, increase the amount of memory you're allocating to the JVM with the -Xmx256m option. Note that you can replace the "256" with whatever else you want, and it accepts other suffixes. Check the man pages to learn more ;~)

~Cheers

Adeodatusa at 2007-7-13 9:50:00 > top of Java-index,Core,Core APIs...
# 2
i hope you are defining it as byte[][] data = ...
dmbdmba at 2007-7-13 9:50:00 > top of Java-index,Core,Core APIs...
# 3
and can be shrunk even further if you store 8 columns in a byte
dmbdmba at 2007-7-13 9:50:00 > top of Java-index,Core,Core APIs...
# 4
i have to create a matrix of 100000 cols and 10000 rows for store numeric values, 0 and 1I don't believe you.There's almost certainly a better way of achieving what you're trying to achieve... which is what, exactly?
itchyscratchya at 2007-7-13 9:50:00 > top of Java-index,Core,Core APIs...
# 5
> Which is 125 MiB of memory, minimum.Doesn't follow: http://en.wikipedia.org/wiki/Sparse_matrix
dcmintera at 2007-7-13 9:50:00 > top of Java-index,Core,Core APIs...
# 6
> > Which is 125 MiB of memory, minimum.> > Doesn't follow:> http://en.wikipedia.org/wiki/Sparse_matrixThere's that, too. Mea culpa.~Cheers
Adeodatusa at 2007-7-13 9:50:00 > top of Java-index,Core,Core APIs...
# 7

Please use sparse matrices representation.Unless your matrix has very few zeros or 1's

It will be List of

pair of coordinates where value in matrix is 1 ( or 0 depending on which stays less in your matrix).

Obviously rest all possible coordinate pairs represent 0.

The disadvantage is : you will have to redefine matrix operations on such representation.

__Dev-eloper__a at 2007-7-13 9:50:00 > top of Java-index,Core,Core APIs...
# 8
Ah, an illiterate reiteration, just the reply the OP needs, I'm sure.
dcmintera at 2007-7-13 9:50:00 > top of Java-index,Core,Core APIs...
# 9

> > Which is 125 MiB of memory, minimum.

>

> Doesn't follow:

> http://en.wikipedia.org/wiki/Sparse_matrix

If this were for sparse data a simple list of Integers would represent the same data just as effectively as a matrix.

If the data is not sparse, a one-dimensional byte array would be my choice.

dubwaia at 2007-7-13 9:50:00 > top of Java-index,Core,Core APIs...
# 10

> Please use sparse matrices representation.Unless your

> matrix has very few zeros or 1's

> It will be List of

> pair of coordinates where

> pair of coordinates where value in matrix is 1 ( or 0

> depending on which stays less in your matrix).

If there are only a few 1s, it's sparse. If there are very few 0s it's also sparse.

dubwaia at 2007-7-13 9:50:00 > top of Java-index,Core,Core APIs...