Skip to main content

[JAVA2D] memory problems with Java and System.gc()

1 reply [Last post]
Anonymous

Dear fellows,

I'm working on very complex bioinformatic problems where huge arrays of strings and other temporary objects are generated. Even when assigning them to the null-pointer after they are no longer needed and calling System.gc() afterwords does not prevent the system from consuming more and more memory resources instead of using the released space.

How can I force the program to use released space instaed of using new one?

Another problem is, that using the -Xmx parameter when invoking Java at most 999 megabyte can be used (or something like 1016 MB); otherwise the virtual machine crashes with strange error messages. Why cant I use the full 2GB memory available on my machine? I'm using Red Hat 9 Linux and Java 1.4.1.

Thank you for helping me
Sven
_______________________________________________________
WEB.DE Video-Mail - Sagen Sie mehr mit bewegten Bildern
Informationen unter: http://freemail.web.de/?mc=021199

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Rosenstrauch, David

> -----Original Message-----
> From: Discussion list for Java 2D API
> [mailto:JAVA2D-INTEREST@JAVA.SUN.COM]On Behalf Of Sven Mielordt
> Sent: Tuesday, July 20, 2004 9:02 AM
> To: JAVA2D-INTEREST@JAVA.SUN.COM
> Subject: [JAVA2D] memory problems with Java and System.gc()

> Dear fellows,
>
> I'm working on very complex bioinformatic problems where huge
> arrays of strings and other temporary objects are generated.
> Even when assigning them to the null-pointer after they are
> no longer needed and calling System.gc() afterwords does not
> prevent the system from consuming more and more memory
> resources instead of using the released space.
>
> How can I force the program to use released space instaed of
> using new one?

Can you use a memory-mapped file here to avoid this problem? Java has
built-in support for memory-mapped files in recent versions.

HTH,

DR

==============================================================================
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".