Quantcast
Channel: jfdube – 0xjfdube
Browsing all 10 articles
Browse latest View live

Memory Management Part 2: Allocations Tracking

Introduction In this post, I’ll cover the basics of memory allocations tracking. If you haven’t read my previous post on allocation strategy, make sure to read it before continuing. Here’s what we want...

View Article



Hashing Strings and Pointers – Avoiding Common Pitfalls

Introduction In a previous post, I suggested using fixed size hash tables to map strings and pointers. Since this code really needs to be fast, reducing hash collisions probabilities is very important...

View Article

Image may be NSFW.
Clik here to view.

Using the Moving Average Filter for Profiling Stats

Introduction When displaying profiling stats or FPS counters or whatever value that varies a lot frame to frame, you don’t want to show the real values since they can vary too much and make the stats...

View Article

Memory Management Part 3: Memory Allocators Design

Introduction Writing a simple memory allocator is quite easy. Writing an efficient allocator that tries to minimize fragmentation, overhead and locking while trying to maximize locality of reference...

View Article

Understanding Atomic Operations

Introduction Atomic operations are the building blocks of synchronization primitives and non-blocking algorithms. They guarantee that, when modifying a memory location, it will happen without any...

View Article


Image may be NSFW.
Clik here to view.

Trigonometric Look-Up Tables Revisited

Introduction In my spare time, I’m working on a 2D game that relies on huge amount of entities being updated and displayed every frame, at 60FPS. This requires to have a permanent eye on overall...

View Article

Image may be NSFW.
Clik here to view.

Memory Management Part 4: Allocators Overhead, Waste and Fragmentation

Introduction As seen in my previous post on allocations tracking, tracking memory allocations is an essential tool for any medium to large-scale game engine. Every AAA games I’ve worked on for the last...

View Article

Understanding Memory Ordering

Introduction In a previous post on atomic operations, I skipped an important topic, which is memory ordering issues. Behind the hood, the processor might reorder memory operations (reads and writes)...

View Article


Implementing a recursive read-write spinlock

Very often I see programmers using a critical section to make some code thread-safe. What happens is that most of the time, the protected code will only read data, while blocking other reading threads...

View Article


Image may be NSFW.
Clik here to view.

Optimizing the recursive read-write spinlock

In my previous post on implementing a recursive read-write spinlock, I briefly talked about trivial optimizations that could be done to improve the time spent in the lock functions. In this post, we’ll...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images