Here is a list of posts demonstrating how to implement a simple memory allocator.

Part 1: The Allocator

Part 2: C-Style Interface

Part 3: STL-Compatible Allocators