Memory Allocation - Part I

In this post we tackle the memory system implementation of Sempervirens. We spend quite some time reviewing the literature, as developing a full-fledged memory allocation system was pretty new to us. We finally set our mind on the approach presented by Stefan Reinalter on his development blog for the Molecule Engine. Stefan wrote an amazing series of posts on the memory system he came up with, as well as posts on various memory allocation strategies. His dev blog is an amazing resource that we cannot recommend enough to new developers!

Read More

Runtime Concept Idiom

This post is about runtime polymorphism and, in particular, about what Sean Parent first described as the runtime concept idiom, that was designed to bring runtime polymorphism back to an implementation detail. Let’s consider a classic example to illustrate what is meant by that. Say we have a collection of objects (Circle, Square, etc) that we want to draw the shape of. The common way to tackle this is to perform type erasure via a Shape base class defining a draw method that all objects can override, by deriving from that base class.

Read More