472,811 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 software developers and data experts.

How can I only trigger minor garbage collection for my objects?

EKL
What do I have to do to guarantee that the objects that my code creates are
reclaimed by only minor garbage collection runs? In other words, what do I
have to do to only generate garbage for minor gc, and not major gc? Thanks.

-ekl
Jul 17 '05 #1
4 4661


"EKL" <En***********@raytheon.com> wrote in message
news:3c*************@bos-service2.ext.ray.com...
What do I have to do to guarantee that the objects that my code creates are reclaimed by only minor garbage collection runs? In other words, what do I have to do to only generate garbage for minor gc, and not major gc? Thanks.
-ekl


"minor gc", "major gc" ?
Where did you get these terms from ? They seem to be imaginary.

Either way, you can't control the behaviour of the garbage collector.

--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
(2003 VTR1000F)
Jul 17 '05 #2
> "minor gc", "major gc" ?
Where did you get these terms from ? They seem to be imaginary.
try reading this page - perhaps IBM is working on imaginary garbage
collection classes :)

http://www-106.ibm.com/developerwork...ry/j-jtp11253/

"Tony Morris" <@dibblegoATbigpond.com@> wrote in message
news:rt*******************@news-server.bigpond.net.au...

"EKL" <En***********@raytheon.com> wrote in message
news:3c*************@bos-service2.ext.ray.com...
What do I have to do to guarantee that the objects that my code creates are
reclaimed by only minor garbage collection runs? In other words, what

do I
have to do to only generate garbage for minor gc, and not major gc?

Thanks.

-ekl


"minor gc", "major gc" ?
Where did you get these terms from ? They seem to be imaginary.

Either way, you can't control the behaviour of the garbage collector.

--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
(2003 VTR1000F)

Jul 17 '05 #3
and re-reading this page it says "There is no way to programmatically
triggor a minor collection".........

so, you can call System.gc() to do a major GC, but again, the article says
you should do this sparingly. if at all.....

Jul 17 '05 #4
"chris sennitt" <cs******@nospamblueyonder.co.uk> wrote in message
news:5a*****************@news-binary.blueyonder.co.uk...
and re-reading this page it says "There is no way to programmatically
triggor a minor collection".........

so, you can call System.gc() to do a major GC, but again, the article says
you should do this sparingly. if at all.....


For some reason, I am unable to access that page.
Either way, this is VM dependant behaviour, and vendor-defined terminology
(as opposed to "Java" terminology).

Calling System.gc() does NOT perform a garbage collection - it "suggests" to
run the garbage collector (Java 2 API Specification). Overriding (or
attempting to override) the very complex garbage collection algorithms that
a VM performs is generally a bad idea.

--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
(2003 VTR1000F)
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
by: Ville Voipio | last post by:
I would need to make some high-reliability software running on Linux in an embedded system. Performance (or lack of it) is not an issue, reliability is. The piece of software is rather simple,...
2
by: C P | last post by:
I'm coming from Delphi where I have to explicitly create and destroy instances of objects. I've been working through a C#/ASP.NET book, and many of the examples repeat the same SqlConnection,...
5
by: Frank | last post by:
Our system maintains session state using the ASP.NET State Server service. We expect some of our session state objects to be over 85K, which categorizes them to be VLO's (very large objects) in terms...
28
by: Goalie_Ca | last post by:
I have been reading (or at least googling) about the potential addition of optional garbage collection to C++0x. There are numerous myths and whatnot with very little detailed information. Will...
8
by: Paul.Lee.1971 | last post by:
Hi everyone, A program that I'm helping to code seems to slow down drastically during initialisation, and looking at the profiling graph, it seems to be the garbage collector thats slowing things...
56
by: Johnny E. Jensen | last post by:
Hellow I'am not sure what to think about the Garbage Collector. I have a Class OutlookObject, It have two private variables. Private Microsoft.Office.Interop.Outlook.Application _Application =...
350
by: Lloyd Bonafide | last post by:
I followed a link to James Kanze's web site in another thread and was surprised to read this comment by a link to a GC: "I can't imagine writing C++ without it" How many of you c.l.c++'ers use...
46
by: Carlo Milanesi | last post by:
Hello, traditionally, in C++, dynamically allocated memory has been managed explicitly by calling "delete" in the application code. Now, in addition to the standard library strings, containers,...
158
by: pushpakulkar | last post by:
Hi all, Is garbage collection possible in C++. It doesn't come as part of language support. Is there any specific reason for the same due to the way the language is designed. Or it is...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.