garbage collection - Check the value gcTrimCommitOnLowMemory from .NET code -


i'm trying confirm various runtime settings have changed being applied application. in particular gctrimcommitonlowmemory in runtime section of aspnet.config file. how can check value of current application?

i go read .config file, want check running value of apps runtime.

i've tried searching no avail. calling configurationmanager.getsection("runtime") returns system.configuration.ignoresection instance.

i go reading .config file manually (and indeed i'm doing in related case). think it, when you're using system.configuration apis happens in background well. so, if unfortunate [1], when don't expose runtime-section, can still read manually , end same effect.

the accuracy of results should equally well. if change values of settings after application has started, configurationmanage theoretically see values, though "stale". self-reading approach no worse here.

fwiw, use following xpaths read value you're after (plus 2 more of interest here):

/configuration/runtime/gctrimcommitonlowmemory/@enabled  /configuration/runtime/gcserver/@enabled /configuration/runtime/gcconcurrent/@enabled 

other writing own (native dll) , poking inside memory of clr, actual runtime-value of "trim commit" setting seems not be exposed applications. can search through coreclr source code see how configuration value unfolds.

in asp.net application, you'd have find aspnet.config file used application's pool. have no experience here, this article provides more information.

[1] think runtime section not mapped proper configuration section, , ignored managed configurationmanager, because read native startup code of clr , "of no interest" managed code.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -