garbage-collection

Java Garbage Collection

I was wondering about the garbage collection that takes place in Java. Is it really able to handle all objects that aren't used and free up the most possible memory? I also want to know how does the Java garbage collection compare to another language like lets say C#? And then, how does the automatic garbage collection measure up agains...

C# : Forcing a clean run in a long running SQL reader loop?

I have a SQL data reader that reads 2 columns from a sql db table. once it has done its bit it then starts again selecting another 2 columns. I would pull the whole lot in one go but that presents a whole other set of challenges. My problem is that the table contains a large amount of data (some 3 million rows or so) which makes workin...

Summary of the last decade of garbage collection?

I've been reading through the Jones & Lins book on garbage collection, which was published in 1996. Obviously, the computing world has changed dramatically since then: multicore, out-of-order chips with large caches, and even larger main memory in desktops. The world has also more-or-less settled on the x86 and ARM microarchitectures f...

.NET 4.0 vs older versions performance comparison

I found something similar discussed, but it was while .NET 4.0 RC. As for current moment does someone tries to do some performance comparison and can share with as.It is very interesting as besides other changes such core modules like CLR and GC are updated. Does that gives any performance advantage. ...

~1s latency control app: is this suitable for Java?

At my work we recently finished the system architecture for a control application which has a maximum latency of roughly one to two seconds. It is distributed on small ARM on-chip boxes communicating via an IP LAN. We initially foresee that we would use C or C++, since it is a classical control system language. After discussing how to ...

How to tell which thread(s) are producing all the garbage?

I have an app with about 15 threads. Most do mundane tasks and sleep most of their lives. Others collect information and cache it in hashmaps. The hashmaps grow to a moderate size and level out. The number of keys and size of value remains constant, but the contents of the values changes (at 33 keys per second average). When I start my ...

How to reduce java concurrent mode failure and excessive gc

In Java, the concurrent mode failure means that the concurrent collector failed to free up enough memory space form tenured and permanent gen and has to give up and let the full stop-the-world gc kicks in. The end result could be very expensive. I understand this concept but never had a good comprehensive understanding of A) what could c...

Delay garbage collection?

I'm using chrome (the dev version for my mac). I was looking at the timeline for my page loading and I saw that there is a 150ms delay due to some garbage collection taking place while loading the page. http://cl.ly/cce10619c698a5b276e2 It's the yellow line. I was curious if there's any way to stop this, delay it, whatever so I get t...

C#: do you need to dispose of objects and set them to null?

C#: do you need to dispose of objects and set them to null, or will the garbage collector clean them up when they go out of scope? ...

How can I disable Java garbage collector ?

Hi, we have a PHP webapp that calls a java binary to produce a pdf report (with jasperreport), the java binary outpus pdf to standart output and exits, the php then send the pdf to browser. This java command lasts about 3 to 6 seconds, I think when it lasts 6 second it's because the GC kicks in, so I would like to disable it because anyw...

reasons why GcTimeLimit might not be erroring out?

I have a web service in Java, contained in Jetty. I'm using Sun's Java 6 with the default ParallelGC, and I have the following command-line options turned on: "-verbose:gc -XX:+PrintGCTimeStamps --XX:+PrintGCDetails". When my process is out of memory, I see loglines like this, back-to-back: 66872.846: [Full GC [PSYoungGen: 932534K->93...

lua userdata c++ destructor

In lua, for memory allocated with lua_newuserdata, is it possible to register a destructor, so that the destructor is called when the memory region is garbage collected by lua? Thanks! ...

Are there any Python reference counting/garbage collection gotchas when dealing with C code?

Just for the sheer heck of it, I've decided to create a Scheme binding to libpython so you can embed Python in Scheme programs. I'm already able to call into Python's C API, but I haven't really thought about memory management. The way mzscheme's FFI works is that I can call a function, and if that function returns a pointer to a PyObj...

actionscript 3.0 garbage collection with casalib ?

I would love to see an actual example how to use the casalib-garbage-collection. I used the destroy method like in the description: casa-lib description If I have a Loader in a Subclass, do I also have to use the CasaLibLoader? Do I have still to care about all Instances/Eventlisteners to do proper garbage collection? If yes, whats the ...

How to get javascript object references or reference count?

How to get reference count for an object Is it possible to determine if a javascript object has multiple references to it? Or if it has references besides the one I'm accessing it with? Or even just to get the reference count itself? Can I find this information from javascript itself, or will I need to keep track of my own reference ...

Is it possible to use Boehm garbage collector only for the part of the program?

I've read article in LinuxJournal about Boehm-Demers-Weiser garbage collector library. I'm interesting to use it in my library instead of my own reference counting implementation. I have only one question: is it possible to use gc only for my shared library and still use malloc/free in the main application? I'm not quite understand how...

Garbage Collection in Java

On the slides I am revising from it says the following: Live objects can be identified either by maintaining a count of the number of references to each object, or by tracing chains of references from the roots. Reference counting is expensive – it needs action every time a reference changes and it doesn’t spot cyclical structur...

Web service performing asynchronous call

I have a webservice method FetchNumber() that fetches a number from a database and then returns it to the caller. But just before it returns the number to the caller, it needs to send this number to another service so instantiates and runs the BackgroundWorker whose job is to send this number to another service. public class FetchingNum...

Garbage collection implementation

In which language garbage collection algorithm is implemented for java.i think c, please confirm? ...

Curious to Know what Eclipse 'Show Heap Status' does

Hi All In Eclipse (I am using 3.4 Ganymede) there is an option under Preferences>General>Show Heap Status which when checked shows near bottom of IDE like 46M of 98M and if we move the mouse over 'Recycle Bin' it says 'Run Garbage Collector'. I am curoius to know how this works.What will happen when 'Run Garbage Collector' is clicke...