Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kavicastelo/assembly_memory_management
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.
https://github.com/kavicastelo/assembly_memory_management
assembly memory-management mingw-w64 nasm windows64
Last synced: 24 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/kavicastelo/assembly_memory_management
- Owner: kavicastelo
- License: mit
- Created: 2024-08-01T12:29:24.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-04T21:09:50.000Z (6 months ago)
- Last Synced: 2024-11-21T00:59:56.153Z (3 months ago)
- Topics: assembly, memory-management, mingw-w64, nasm, windows64
- Language: Assembly
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
- NASM (Netwide Assembler)
- MinGW-win64 (Minimalist GNU for Windows)### Compilation
```bash
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
```bash
.\example.exe
```### Examples
- `simple_memory_management.asm` (EX2): Demonstrates basic manual memory allocation and deallocation.
- `simple_memory_management_with_heap.asm` (EX1): Shows how to manage dynamic memory using the heap.
- `first_fit_allocation.asm` (EX3): Implements a first-fit allocation strategy with a custom memory pool.## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.