Optimizations That You Have to Wring From WebAssembly

Introduction First of all, I want to put up a disclaimer: I am not a WebAsssembly expert. All the 5 tips mentioned in this article are gained from my C++ OpenGL slideshow application. I have to admit I have no working knowledge on Blazor, an implementation of Webassembly for C# and .NET. And I am …

Bug Reports: Memory Leak in VC++ PPL and ASAN support in MFC

Today, I just filed 2 bug reports on Visual C++: Memory Leaks in VC++ PPL’s parallel_for_each() reported by Deleaker and MFC support in Address Sanitizer. The latter is having linkage issue of duplicate symbols of new/delete operators that exists in both MFC and Clang ASAN. I need your help to upvote these 2 bug reports …

Direct2D Tutorial Part 1: RenderTarget

Introduction Direct2D is introduced to phase out the dated GDI+ in 2009 and is supported on Windows 7 or newer. This is the first in an introductory Direct2D tutorial series. In this tutorial, we are going to take a look at various different RenderTarget. Think RenderTarget as a canvas to draw on. We focus on …

C/C++: Allocate Variable-size Arrays on the Stack

C language provides the alloca function to allocate arbitrary size array on the stack. After the function returns or the scope ends, the stack memory is automatically reclaimed back(popped back) without the developer having to deallocate it explicitly and thereafter is unsafe to access it again from another function. The below code shows allocating fixed …

Address Sanitizer in Visual C++

In this blog, I’ll demonstrate on how to utilize Address Sanitizer (ASan) in Visual C++ to check for memory problems. MSVC team ported the Clang ASan to the Windows platform in 2019 and since it is still at the experimental stage, be sure to expect kinks to be ironed out. Before using Address Sanitizer in …

C++23: Mutable string_view

In the upcoming C++23, the mutable string_view proposal is under review for inclusion in the next Standard Library. As we all know the current immutable string_view has two members, a const pointer to a constant char array and a constant length whereas in the mutable sibling, both members are modifiable. Let me illustrate with a …

Deleaker Review

What keeps a C++ developer awake at night? A nagging question at the back of his subconsciousness is “Does my application have a memory leak?”. Continual memory leaks can be detrimental to long-running programs and eventually, the system runs out of memory and is stopped in its operation. Detection and elimination of memory leak should …

Visual C++ 6.0 Developer’s Reference

Came across this picture of Visual C++ 6.0 Developer’s Reference(1998) posted by raddevus. I had a C++ Master Reference published in 1999. It has 1500 pages of C++ language and library reference! I had perhaps only read one page(about atoi()). It is like a predecessor of Cppreference except it is printed on book and is …