Tracking Unusable Virtual Memory in VMMap

July 22, 2014

VMMap is a great Sysinternals tool that can visualize the virtual memory of a specific process and help understand what memory is being used for. It has specific reports for thread stacks, images, Win32 heaps, and GC heaps. Occasionally, VMMap will report unusable virtual memory, which is not the same as free memory. Here's an example of a VMMap report for a 32-bit process (which has a total of 2GB virtual memory): Where is this "unusable" memory coming from, and why can't it be used? The Windows virtual memory manager has a 64KB allocation granularity. When you allocate memory directly...
no comments

Materials From My SDP 2014 Sessions and Workshops

July 6, 2014

This year's first SDP has been a huge success, with over 1,200 developers signed up for a huge variety of workshops and talks. The snow didn't keep me from getting to Tel-Aviv this time, and I enjoyed the conference atmosphere, the talks, and some great conversations. View from one of the SDP rooms. Really hard to stay focused on developer stuff :) I'm also VERY MUCH behind on emails and everything else that isn't directly related to the conference -- so it's going to take me a while to recuperate. In the meantime, here are the materials...
one comment

Why Swift?

June 9, 2014

From the moment Apple has announced Swift, the new iOS and OS X programming language, the web is full of hate and praise, constructive criticism and pointless rants, confusion and excitement -- and many of these boil down to "why Swift?" -- namely, why Apple chose to design a new programming language rather than pick and adapt an existing one. Needless to say, I don't work for Apple, so all I can offer is an educated guess based on a lot of playing with Swift and trying to understand the mindset that led to its design and implementation. If you have...

Intents, Contracts, and App Extensions: App Communication on Android, Windows Phone, and iOS

June 3, 2014

Apple has just announced at WWDC that iOS 8 (and OS X Yosemite) will be equipped with app-to-app communication capabilities that can extend system functionality through a set of well-defined extension points. This is, without doubt, the major iOS 8 feature from my perspective, with the rest of the developer- and consumer-related features fading to the background. (Well, there's also Swift, a new programming language for iOS and OS X, to learn.) Pre-release documentation for app extensions is available here, and shows that there are several new extension points where apps can now integrate. Prior to iOS 8, the only...
no comments

iOS File Association, Preview, and Open In… with Xamarin

May 29, 2014

Many mobile apps need the ability to preview files -- email attachments, web links, cloud photos, and other assets. Some apps even need the ability to open and handle files themselves. Although file sharing between iOS applications hasn't always been available and easy, basic file sharing scenarios are now entirely accessible and easily available to any iOS app. In this post we'll take a look at how iOS apps can register as a file type handler for a specific file type, how apps can preview files, and how apps can trigger an "Open in..." dialog so that another app...
tags: , ,
one comment

Identifying Specific Reference Type Arrays with SOS

May 1, 2014

When you're looking for arrays of a specific type using SOS, you might notice a weird phenomenon. Value type arrays (such as System.Int32) will be shown properly regardless of which command you use, but reference type arrays (such as System.String) exhibit some weird behavior. Here's an example: 0:000> !dumpheap -stat Statistics: MT Count TotalSize Class Name ... 00007ffecf435740 2 304 System.Byte 00007ffecf4301c8 2 320 System.Threading.ThreadAbortException 00007ffecf4327d8 11 ...
no comments

.NET Native Performance and Internals

April 28, 2014

Introduction to .NET Native.NET Native is a compilation and packaging technology that compiles .NET applications to native code. It uses the C++ optimizing compiler backend and removes the need for any JIT compilation at runtime and any dependency on the .NET Framework installed on the target machine. Formerly known as "Project N", .NET Native is currently in public preview and this post explores the internals of the compilation process and the resulting executable's runtime performance.At this time, .NET Native is only available for C# Windows Store Apps compiled to x64 or ARM, so the experiments below are based on...

C# Vectorization with Microsoft.Bcl.Simd

April 22, 2014

tl;drA couple of weeks ago at Build, the .NET/CLR team announced a preview release of a library, Microsoft.Bcl.Simd, that exposes a set of JIT intrinsics on top of CPU vector instructions (a.k.a. SIMD). This library relies on RyuJIT, another preview technology that is aimed to replace the existing JIT compiler. When using Microsoft.Bcl.Simd, you program against a vector abstraction that is then translated at runtime to the appropriate SIMD instructions that your processor supports.In this post, I'd like to take a look at what exactly this SIMD support is about, and show you some examples of what kind of...

Wrapping Up TechDays Netherlands 2014

April 17, 2014

What a crazy week it was! On Monday evening I was totally stuffed from the traditional Passover dinner at my parents' house, and on Tuesday morning I was already flying to Amsterdam for TechDays Netherlands 2014 to deliver three talks on Azure Mobile Services and Notification Hubs. Thanks everyone for coming to my talks and I'm sorry for the botched demo at the end of the third one -- there's only so many times you can tempt the demo gods before something goes wrong, and in this case it was the Internet connection (both wired and wireless) towards the end...

Wrapping Up DevWeek 2014

April 6, 2014

I have landed from London six hours ago after a wonderful week at DevWeek. Three talks and a workshop made for a pretty busy schedule, but I still had time to enjoy London, with its unusually sunny weather. What's New in C++ 11 My first talk, at 9:30am in the morning, attracted a small audience of C++ developers. C++ 11 is a very extensive new standard, and if you read code developed in the modern C++ style, you might think it has nothing to do with your favorite language of the 1990's. Indeed, I tried to illustrate the major...