/// <summary> /// Starts useful services that run in the background to assist in various operations. /// </summary> private void StartBackgroundServices() { SnapshotPrefilterFactory.GetSnapshotPrefilter(typeof(ChunkLinkedListPrefilter)).BeginPrefilter(); //// PointerCollector.GetInstance().Begin(); DotNetObjectCollector.GetInstance().Begin(); AddressResolver.GetInstance().Begin(); OutputViewModel.GetInstance().Log(OutputViewModel.LogLevel.Info, "Background Services Started"); }
/// <summary> /// Collects a new snapshot of memory in the target process. /// </summary> /// <param name="useSettings">Whether or not to apply user settings to the query.</param> /// <param name="usePrefilter">Whether or not to apply the active prefilter to the query.</param> /// <returns>The snapshot of memory taken in the target process.</returns> public Snapshot CollectSnapshot(Boolean useSettings = true, Boolean usePrefilter = true) { if (usePrefilter) { return(SnapshotPrefilterFactory.GetSnapshotPrefilter(typeof(ChunkLinkedListPrefilter)).GetPrefilteredSnapshot()); } IEnumerable <NormalizedRegion> virtualPages = this.CollectSnapshotRegions(useSettings); // Convert each virtual page to a snapshot region (a more condensed representation of the information) List <SnapshotRegion> memoryRegions = new List <SnapshotRegion>(); virtualPages.ForEach(x => memoryRegions.Add(new SnapshotRegion(x.BaseAddress, x.RegionSize))); return(new Snapshot(memoryRegions)); }