nasm-x86-assembly-memory-management

NASM x86 Assembly Memory Management Examples

This repository contains examples of memory management implemented in x86-64 assembly on Windows. Each example demonstrates different approaches to handling memory allocation and deallocation.

Contents

  1. Simple Memory Management Example A basic example that demonstrates manual memory management using a statically allocated memory pool.
  2. Simple Memory Management with Heap An extension of the basic example that includes dynamic memory allocation using heap memory.
  3. First Fit Allocation Example An example implementing a simple first-fit memory allocation strategy, showing how to manage a memory pool efficiently.

Getting Started

Prerequisites

Compilation

nasm -f win64 -o example.exe example.asm
gcc -m64 -o example example.o -lkernel32 -lmsvcrt

Replace example.asm with the desired file name.

Running the program

.\example.exe

Examples

License

This project is licensed under the MIT License - see the LICENSE file for details.