Writing a Pool Allocator

⏱ Limited promo: 1 day left

Interpreter from scratch $54  $14
Parser from scratch $49  $14
Parser + Interpreter bundle  ⭐️ $89  $25
Virtual Machine $64  $14
Virtual Machine + Interpreter bundle  ⭐️ $84  $25
Parsing Algorithms $49  $14
Parser from scratch + Algorithms bundle  ⭐️ $74  $25
All courses — Ultimate Bundle  ⭐️ $299  $99

In the previous article on Writing a Memory Allocator we discussed and implemented a generic memory allocator. We have seen how a memory is requested from OS (through the memory mapping), and in particular focused on different strategies of the Free-list allocation.

In today’s lecture we’ll be discussing a Pool allocator.

Continue reading

Writing a Memory Allocator

⏱ Limited promo: 1 day left

Interpreter from scratch $54  $14
Parser from scratch $49  $14
Parser + Interpreter bundle  ⭐️ $89  $25
Virtual Machine $64  $14
Virtual Machine + Interpreter bundle  ⭐️ $84  $25
Parsing Algorithms $49  $14
Parser from scratch + Algorithms bundle  ⭐️ $74  $25
All courses — Ultimate Bundle  ⭐️ $299  $99

This is the 6th lecture from the Garbage Collection Algorithms class, devoted to the automatic memory management.

Before discussing algorithms of collecting the garbage, we need to see how these objects (which eventually become a garbage) are allocated on the heap. In today’s lecture we consider mechanisms of memory allocation.

Continue reading

MIPS Assembly parser

MIPS architecture is used in many embedded systems today, including gaming consoles, routers, and other devices. It is a RISC architecture, which makes decoding of the instructions easier, and the number of basic instructions is not that big (in contrast with CISC architecture, used e.g. in x86). This makes MIPS a good learning architecture, and that’s why it’s often used in universities in compiler class for code generation. And as a part of course for implementing a virtual machine for a subset of MIPS instructions, I have built the parser for its assembly. Continue reading