- https://www.nuget.org/packages/Microsoft.Diagnostics.Runtime
- https://github.com/Microsoft/clrmd
- http://mattwarren.org/2018/06/15/Tools-for-Exploring-.NET-Internals/#tools-based-on-clr-memory-diagnostics-clrmd
- https://github.com/Microsoft/clrmd/blob/master/Documentation/GettingStarted.md
- https://github.com/dotnet/symstore/tree/master/src/dotnet-symbol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The absence of the C# unsafe keyword and switch does not guarantee code | |
is type or memory safe. It merely prevents the use of pointer types and | |
fixed size buffers. | |
The only thing that can guarantee type and memory safety is | |
verification and CAS/transparency enforcement. | |
In particular, the absence of unsafe C# blocks does NOT: |
Download the official Microsoft release or the latest one on GitHub
DON'T BE PUT OFF BY THE UI (But if you are take a look at CodeTrack)
- Run a memory profile on one of your own .NET apps (or download and interesting sample one, e.g. NerdDinner or similar)
- If all else fails, follow this tutorial that includes the code for a simple 'sample app'
A .NET library to make Benchmarking easy! See https://benchmarkdotnet.org/ and in-particular the Getting Started Guide the Main Features List
Add the NuGet package Install-Package BenchmarkDotNet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Attributes.Columns; | |
using BenchmarkDotNet.Configs; | |
using BenchmarkDotNet.Running; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.CompilerServices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
veh_hook Vectored Exception Handler hooking library | |
Version: 24-March-2008 | |
**/ | |
#define WINVER 0x0501 | |
#define _WIN32_WINNT 0x0501 | |
#include <windows.h> | |
#include "veh_hook.h" | |
static veh_list_t* list = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Q: At which size is it preferrable to use binary search over a simple linear search for a small ordered set? | |
R: Under 5 elements, linear search is slightly faster (from 200% to 10% faster) | |
But in practice, not sure a switch case to select the best method is really worth it | |
Unless main usecase is having most of the time only 1-2 elements (so it could be optimized manually without a loop and switch to binary otherwise) | |
At 3-4 elements, linear is only 10-5% faster | |
Relative performance between linear and binary search: | |
size x86 x64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Config(typeof(Config))] | |
public class ContinueWithAllocations | |
{ | |
private class Config : ManualConfig | |
{ | |
public Config() | |
{ | |
Add(new MemoryDiagnoser()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Diagnostics.Runtime; | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace SDDTriage | |
{ |
NewerOlder