hello,
i've been reading about memory allocation and c++ programming in general..
my boss thinks it is a good idea to try and design a simple garbage collector to enhance my learning (
i always believed..
it is better to code a project, than to do a generalized written code, to test functions, because it helps understand the exact usage ...
Ok this is potentially a noob question but here goes.
Is it possible to "outrun" the garbage collector?
The reason I ask is because I have a recursive method that gets run several times during some event in my application (by several I mean around 60 times per second and the event goes on for an indefinite amount of time, even minutes)...
When I build the following C++/CLI code in VS2008, a code analysis warning CA1001 is displayed.
ref class A
{
public:
A() { m_hwnd = new HWND; }
~A() { this->!A(); }
protected:
!A() { delete m_hwnd; }
HWND* m_hwnd;
};
ref class B
{
public:
B() { m_a = gcnew A(); }
protected:
A^ m_a;
};
warning: CA1...
We have a long running server application running Java 5, and profiling it we can see the old generation growing slowly over time. It's correctly freed on a full GC, but I'd like to be able to look at the unreachable objects in Eclipse MAT using a heap dump. I've successfully obtained a heap dump using +XX:HeapDumpOnCtrlBreak, but the JV...
I've had this troubling experience with a Tomcat server, which runs:
our Hudson server;
a staging version of our web application, redeployed 5-8 times per day.
The problem is that we end up with continous garbage collection, but the old generation is nowhere near to being filled. I've noticed that the survivor spaces are next to inex...
It's more a theoretical question than a practical one. I know that GC are currently working with big process that use 1,2 or 3 Go of memory but I'd like to know if it is theoretically possible to have an efficient GC with really huge memory (1000 Go or more).
I ask this question because, even if the GC could run its algorithm progressiv...
I have a reference to an object. This object has a timer event with a weak reference. Example:
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
Now I remove this reference (test is the variable containing the reference):
test = null;
And yet, the timerHandler keeps being fired. Is this impossible, so that I m...
I'm having a severe memory leak issue with my program. I'm using Apple's Instruments to track my leaks, and in the first few seconds after my app starts there are hundreds and hundreds of leaks listed. The problem is none of them seem to tell me where the leak is coming from.
I've gone through all my classes and made sure that anything ...
As the title says, my app crashes when garbage collection is not enabled. The app pops up for a few seconds and then it just crashes, with nothing but this in the debugger console:
[Session started at 2009-08-17 15:03:20 -0600.]
GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)
Copyright 2004 Free Software F...
Is there a mechanism for getting a reliable value for the number of active objects in a Ruby environment? I've found several approaches to produce an answer, and typically they resemble:
c = 0
ObjectSpace.each_object { c += 1 }
The unfortunate problem with this is that there's a large number of Fixnum objects created simply to tabu...
Hi, I have static class with static dictionary with some informations.
The dictionary has key as WeakReference (i don't want prevent garbage collection of the real key object ).
Code sample:
public static class ThreadHelper {
private static readonly object syncRoot = new object();
private static Dictionary<WeakReference, Thread...
I wanted to compare the performance characteristics of immutable.Map and mutable.Map in Scala for a similar operation (namely, merging many maps into a single one. See this question). I have what appear to be similar implementations for both mutable and immutable maps (see below).
As a test, I generated a List containing 1,000,000 s...
I want to learn the theory behind garbage collection. How do i go about it? The obvious answer is - a compiler textbook... The question is, is it necessary to learn lexical analysis, parsing and other stuff that usually precedes garbage collection in a text?
In short, what are the prerequisites to learning about Garbage collection theo...
Please help me
How to prevent an object from getting garbage collected
is there any approaches by finalize or phantom reference and is there any other approaches?
UPDATED:I was asked a ques in an interview he was referring something can be done in finalize()
...
Hi,
Here's Mono Continuations' continuation_store (...). From looking at the code below, it appears as though store() follows these two branches:
cont->saved_stack && num_bytes <= cont->stack_alloc_size
use the memory directly
else
gc free the used memory, and create some new memory.
However, the weird thing is if I repeatedly ...
I'm troubleshooting an OutOfMemory exception in my .NET 2.0 Windows Service application. To understand the issue better I began by writing a simple .NET WinForm test app that generates an OOM Exception by building an ArrayList until an OOM Exception is thrown. The exception is caught and logged and I can click on a form button to run t...
Once again a question about the garbage collector in actionscript-3:
If I have a master container:
var masterContainer:Sprite = new Sprite();
And then I add a child to this container:
var childImage:Sprite = new Sprite();
masterContainer.addChild(childImage);
addChild(masterContainer);
And, I then decided to let the garbage collec...
Hi,
Right now I'm experiencing lag spikes every 3-4 seconds where 500ms+ is spend on GCing.
Does anyone have some pointers on controlling the Mono GC? I.e. get it to collect n% of the memory instead of 100% while increasing the collection interval.
Thanks
...
is garbage collection algorithm in java "vendor implemented?"
...
On analyzing my 4 days log of verbose, I get this
Number of Global Garbage Collection: 0
Number of Scavenger Garbage Collection: 492
that's all?
My tenured area is continuously full and memory leak is occurring.
No GC attempt has been made to clear the memory
Nursery area is always almost free/ empty (reason for low scavenger calls)
...