.NET/C#: How to set debugging environment variable COMPLUS_HeapVerify?
Asked Answered
U

1

2

I need the heap to be verified each time the garbage collector (GC) finishes its work. I read this can be done by setting the environment variable COMPLUS_HeapVerify to 1. But how exactly do I set this variable?

I read this can be done via Computer/Advanced System Settings/Advanced/Environment Variables (Windows 7), somebody tells I should set up a new system variable (here), others tell this should be a user variable (here).

Is this approach correct and which (system or user) variable should be set?

Underling answered 19/9, 2011 at 10:4 Comment(0)
P
1

The approach you mentioned is absolutely correct.

  1. Go to Control Panel->System Properties->Advanced System Settings->Environment Variables.

  2. If you have administrator privileges, add a system variable called “COMPLUS_HeapVerify” with a value of “1”; otherwise — add the user one. Note, in the second case you might need to log out and log on.

Hope that helps.

Pollination answered 25/9, 2011 at 18:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.