Debugging RAM: Detect/Fix Memory Leaks in Managed Languages – Heap Deep Dive (Part 2)

In the previous installment, I talked about the Java garbage collector. In this part, I'll discuss the most common memory issue: the memory leak. I focus on managed languages, specifically Java, but I will mention some native code tools which are interesting. A memory leak contributes to heap size, which isn't the most pressing bug in most cases. But when left alone, memory usage can become a problem and, by that point, finding the issue is hard. Unlike a crash dump, where we get a reference to a specific line, a memory leak can remain hidden.

What are the Consequences of Memory Leaks?

Unfortunately, this often means that memory leaks can carry into production and even cause problems to end users. E.g. This recent story about memory leaks hobbling Apples latest M1 computers. Virtual memory effectively means operating systems can carry memory leaks for a very long time. The performance overhead will be noticeable, though.

Memory Leak: Bit-Wise and Member-wise Copy in C++

Earlier versions of C++ (prior to release 1.2) implemented assignment between objects through bit-wise copy of the source to the destination. Consider the following example that illustrates a bit-wise copy.

C++


The main program has two objects of class MyString.

Investigating a Memory Leak in Entity Framework Core

Don't let memory leaks become floods

The terms "memory leak" and ".NET application" are not used together very often. However, we recently had a spate of out of memory exceptions in one of our .NET Core web applications. The issue turned out to be caused by a change in behavior in Entity Framework Core, and whilst the eventual solution was incredibly simple, the journey to get there was both challenging and interesting.

The system itself is hosted in Azure and is comprised of an Angular SPA front-end and a .NET Core API on the back-end, using Entity Framework Core to talk to an Azure SQL Database. As a software consultancy specializing in .NET development, we've written many similar applications before.

Automatic Reference Counting (ARC) and Memory Management in Swift

Get ARC to work for you

Memory management is a key factor when we develop apps. If a program is using a lot of memory, it can make apps run slowly or even cause crashes. To handle this in Swift, you can work with Automatic Reference Counting (ARC) to keep your apps memory usage minimal. This doesn’t mean you can completely forget about the memory in your app, but it does take care of most things for you.

It’s important to note that ARC only works when working with classes. Structs and enums are value types and therefore are stored differently in memory than classes, which are stored and passed by reference.

Gradle 5.6 Update: Making Groovy Compilation Faster

These new features and enhancements are totally groovy, man.

In this post, we will learn about the enhancements of about Gradle 5.6.

You may also like:  Groovy: A Retrospective

1. The Exit of Leaking Authentication Data

It was found that authentication data may leak while using the Gradle build tool to resolve dependencies against the custom authenticated repository. Officials are unaware of anyone having exploited the flaw, and thus, you should definitely upgrade the version since the features causing this issue are within the codebase and hard to disable.