473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 4690


"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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.