Loading…
Tuesday, May 21 • 13:45 - 14:45
Manual memory management in .NET Framework

Log in to save this to your schedule and see who's attending!

Feedback form is now closed.
Value types are on a stack and reference types are on a heap - this is a typical answer when one is asked about placement of values in memory. However, is it really defined that way in the .NET Framework specification? Or can we bend the rules and manage memory differently?

During the session I will show how to allocate memory directly by hand using TypedReferences. We will see that it is possible to allocate reference type on a stack, how to implement generic List faster than the default implementation provided by .NET Framework, how to implement custom memory allocator (with any fragmentation strategy we like), and finally, how to hack new keyword provided by the platform to use different allocator. We will examine memory dumps with WinDBG, emit IL code dynamically, and generate machine code for x86 directly in runtime.

Speakers
avatar for Adam Furmanek

Adam Furmanek

Amazon
I am Adam Furmanek and I have been working as a .NET developer for 5 years. Right now I am at Amazon working with Scala, Spark and Machine Learning. I am always interested in digging deeper, exploring machine code and going through implementation details to better understand internals... Read More →


Tuesday May 21, 2019 13:45 - 14:45
Room 13