Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
> try the following program, it will throw > class MType { It is not 32MB. Objects require memory, not just the data inside I believe. > MType[] msg = new MType[maxmsg]; Keep track of the memory free and used with Runtime. At the end of the Out of memory exception, Java used roughly about half (64M) of the total memory on my system. Runtime rt = Runtime.getRuntime(); After each println (every 1,000 allocation), I put:
Replies: |
Sponsored Links
|