Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Correct way to stop gc from scanning an array

Moderators: larsivi kris

Posted: 09/27/08 15:12:44

I'm having a problem with increasing garbage collection pauses as my program runs and one of the possible culprits is an array of structs that is several million items long (the structs contain no pointers but tend to fill up with random looking data as the program runs).

I had initially found GC.getAttr/setAttr and was checking and then setting the NO_SCAN flag. But then I noticed GC.removeRange which from my understanding would be the same as GC.setAtter(&struct_array, GC.BlkAttr?.NO_SCAN). Is this really just two ways of saying the same thing or am I misunderstanding something?


There are no responses to display.