We have recently upgraded one of our applications from Java 1.4 to Java 6.
With some load & performance tests, we observed that available memory stayed in general at much lower levels in Java 6 than at what it used to be with Java 1.4.
After some profiling on the app with Java 6, we noticed that many objects no longer referenced by any...
I've been playing around with XNA a lot lately and I've also been reading quite a bit about garbage collection in games. I think I've done a reasonable job of reducing the amount of garbage by using pooling and avoiding a dependence on foreach.
Right now I have my base game entities stored in a KeyedCollection that allows me to iterate ...
I'm looking for a fast and much lightweight as possible open source virtual machine for implementing my custom programming language. The virtual machine should support some minimal set of bytecode (like LLVM IR), but can easily embedable from a C++ application (which filters out LLVM from the list). It should be wrriten in C/C++.
I'm l...
I am using the G1 garbage collector with JDK1.7.0, but the VM does not recognize the option G1YoungGenSize. Specifically, when I run:
java -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1YoungGenSize=512m ...
I get the following error:
Unrecognized VM option 'G1YoungGenSize=512m'
Error: Could not create the Java Virtual Machine....
In code, say we have:
using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["LocalSqlServer"].ToString()))
{
cn.Open();
// Set all previous settings to inactive
using (SqlCommand cmd = new SqlCommand("UPDATE tblSiteSettings SET isActive = 0", cn))
{
cmd.Ex...
As an example lets say that I set the JVM's maximum heap to 4GB. However, once my application reaches about 3GB, the OS starts to swap some memory to disk. At this point there are several objects already out of scope, and instead of requesting more memory the JVM could first garbage collect old objects. In terms of performance it would b...
I have a java application that wants to invoke the system.gc(). Is it a reasonable method to release memory? or any other advice? Really appreciate!
...
Suppose there is the following code:
foreach (...)
{
List<int> localList = new List<int>(100);
// do stuff
localList = null;
}
From time to time, I am tempted to null references just as the procedure is about to exit (that is, return) or in this case, just as it is about to loop. Is there any benefit to doing so, even i...
window.global_array = new Array();
window.example = function()
{
var x = new Object();
x['test_property'] = 3;
global_array.push(x);
}
Javascript gurus, please answer three questions:
will javascript delete x at the end of scope when example() returns, or preserve it inside global_array.
can I safely assu...
Monitoring my program's Virtual Bytes usage while it is running showed that by doing some kind operations, the virtual bytes usage goes up by about 1GB in about 5 minutes.
The program deals with tcp sockets and high data transfer throughput between them (~800Mbps).
Loading a dump file of the program in windbg showed that the reason for ...
How can I call a GC in .net when I have done with the object that i created for a class.
If I sets an object value as Null
objClassObject=NULL;
Does it releases all the objects and resources associated with it. ?
...
When building a system which needs to respond very consistently and fast, is having a garbage collector a potential problem?
I remember horror stories from years ago where the typical example always was an action game where your character would stop for a few seconds in mid-jump, when the garbage collector would do it's cleanup.
We are...
I have a web app that serializes a java bean into xml or json according to the user request.
I am facing a mind bending problem when I put a little bit of load on it, it quickly uses all allocated memory, and reach max capacity. I then observe full GC working really hard every 20-40 seconds.
Doesnt look like a memory leak issue... bu...
What's the best way to avoid using GC in D? Is there a way to use classes that doesn't involve their memory being managed, or do you have to use pointers to malloc'd structs like you would in C and C++?
...
Hi all
I have a particular thread that I kick off when by CF9 application starts. It manages a queue and takes items from the queue to process them. If there are no items to take from the queue it will sleep(). This thread could live for weeks, processing and sleeping etc.
The problem I am having is that the items I am taking from th...
Supposing the following situation:
typedef struct rgb_t {float r,g,b} rbg_t;
// a function for allocating the rgb struct
rgb_t* rgb(r,g,b) {
rgb_t* c = malloc(sizeof(rgb_t));
c->r=r;
c->g=g;
c->b=b;
return c;
}
// expose rgb creation to lua
int L_rgb (lua_State* L) {
rgb_t** ud = (rgb_t **) lua_newuserdata(L, sizeof(rgb_t *));
...
Hi All,
I am combating some memory issues in my app and am finally managing to get to the bottom of it. I have had an example recently where my process memory went up to 800mb when processing a task. I have managed to get this to settle at 140mb now which is perfectly acceptable. However this has made me question my understanding of the...
I'm a .net programmer, without much experience with unmanaged code. I've been adding modifications and additions to an unmanaged project, and everything is functioning just fine. Can you give me some pointers as to what kind of code/objects I need to be concerned about in regard to garbage collection?
TIA
...
Is it possible to run .NET garbage collector from command line, e.g. without writing code?
...
What is the difference between Garbage Collection and Reference Counting in Mac OS X.
Thanks and regards.
Mahadevan S
...