Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Garbage Collector question?


  • From: yogesh@xxxxxxxxx (Yogesh Pandeya)
  • Subject: Garbage Collector question?
  • Date: Tue, 30 Nov 1999 14:01:42 -0000

Hi Magesh,
Another sequence on gc!!!! Anyway.....

Putting System.gc() doesn't guarantee that it will run when you want to. =
Its VM's prerogative to run gc or not. It is guaranteed run at the point =
you put System.gc(), only if you run the application with -noclassgc (or =
-Xnoclassgc) option.=20
Other point to note is, if you are creating objects temporarily, you can =
use an object pool and reuse your objects. There is good article this =
month's Javaworld.
Hope it helps,
cheers,
Yogesh

     -----Original Message-----
From:	magesh@xxxxxxxxxxxxxxxx [SMTP:magesh@xxxxxxxxxxxxxxxx]
Sent:	Tuesday, November 30, 1999 1:23 PM
To:	advanced-java@xxxxxxxxxxxxxxxx; punam chordia
Subject:	RE: Garbage Collector question?



Hi,

Does this guarantee that the System.gc() will run without getting =
context
switched
because it has a low priority??

thanks,
mmp.





punam chordia <punamac@xxxxxxx> on 11/30/99 02:44:03 AM

To:   Mageshkumar Maruthapillai/Technology Providers/lk
cc:
Subject:  RE: Garbage Collector question?




We also had a similar problem.
U can run garbage collector explicitly by writing the following line of
code,
System.gc();
I hope it helps you.
Punam Chordia
Software Engineer
ITL Infosys, Pune.
Ph. 91-020-647420/1 Extension: 1046
> -----Original Message-----
> From:   magesh@xxxxxxxxxxxxxxxx [SMTP:magesh@xxxxxxxxxxxxxxxx]
> Sent:   Tuesday, November 30, 1999 PM 01:06
> To:     advanced-java@xxxxxxxxxxxxxxxx
> Subject:     Garbage Collector question?
>
>
>
> Hi,
>
>     My server code is consuming a lot of memory dur to a large number
> of objects being created temporarily.
>
> I want to be able to get a reference to the garbage collector
> of the virtual machine so that I can give it a high priority to it
> very short intervals intermittently.
>
>
> Is there a way to get the reference to the garbage collector?
>
>
> any help is appreciated.
>
> thanks,
> mmp
>
>
>
> ---
> To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
> To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx





---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx

---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx