Not seeing the WKS:: and the SVR:: namespace?

These namespaces were introduced in CLR 2.0. For example for the




symbol, it's WKS::GCHeap::GcCondemnedGeneration for Workstation GC and SVR::GCHeap::GcCondemnedGeneration for Server GC (if you are reading the Investigating Memory Issues article in the recent MSDN magazine and are trying out some of the debugger commands mentioned in there).


If you are using CLR 1.1 or prior, the Workstation version lives in mscorwks.dll while the Server version lives in mscorsvr.dll so the symbol names are not prefixed with WKS:: or SVR::. So the breakpoint


bp mscorwks!WKS::GCHeap::RestartEE "j (dwo(mscorwks!WKS::GCHeap::GcCondemnedGeneration)==2) 'kb';'g'"


should be


bp mscorwks!GCHeap::RestartEE "j (dwo(mscorwks! GCHeap::GcCondemnedGeneration)==2) 'kb';'g'"


Comments (6)

  1. nativecpp says:

    Hi Maoni,

    I ran across the following statements:

    "Allocating long lived objects at application initialization will ensure that the objects need not be compacted when garbage collection happens. When garbage collection happens, the GC compacts the memory to generate a contiguous space of free memory.

    Allocating long lived objects at the application initialization has two benefits: ensuring that the objects survive the lifetime of application thereby reducing the number of Gen 2 collections and avoiding the need for GC to compact the memory"

    I thought long lived objects would eventually be promoted to gen 2 if memory pressure occurs and that the only thing that would benefit early initialization is for object pooling ?

    Can you comment on the statments ?


  2. Where did you see those statements? They are incorrect.

    Allocating long lived objects does not ensure they survive the lifetime of the app. If they meant static objects then they will be dead when the appdomain they are associated with is unloaded.

    Long lived objects will be promoted to gen2 even if memory pressure doesn’t occur. If they survive gen0 they’ll be promoted to gen1, then to gen2.

  3. nativecpp says:

    Hi Maoni,

    Thanks for the confirmation. When I first read the statements, I knew it was incorrect but I wanted to get some pro to verify it.

    As for the source of the statement, I am more than happy to disclose to you *privately*. Do you proof-read blog entry before publishing to the public ?

    I don’t want to get myself in trouble :-))

    At any rate, I can even attaching the 50+ pages of the document via email, etc. I think you would be suprised by the source. The problem with this document is that some of the statements are true !!!


  4. nativecpp, that’s okay… I was asking ’cause I thought this was some public article you saw.

  5. nativecpp says:

    That’s some public article. It was from some *big* company even though the article was kind of old (2003) and was a beta version. You could download it freely.

    Because it is a public article and from a *big* company, I am just worried that it would make someone looks bad (even though it is a beta) ???

    It is up to you.


  6. No, that’s ok. I know there are lots of articles on GC that are wrong. I can’t correct all of them….

Skip to main content