Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peterajhgraham/dynamic_memory_management
This repository focuses on managing dynamic memory allocation in C using malloc, realloc, and free. This program processes an array of integers, allowing the user to add, remove, and search for elements, along with printing the array's contents, displaying its summary statistics, and at the end will release all allocated memory.
https://github.com/peterajhgraham/dynamic_memory_management
memory-allocation memory-management
Last synced: 14 days ago
JSON representation
This repository focuses on managing dynamic memory allocation in C using malloc, realloc, and free. This program processes an array of integers, allowing the user to add, remove, and search for elements, along with printing the array's contents, displaying its summary statistics, and at the end will release all allocated memory.
- Host: GitHub
- URL: https://github.com/peterajhgraham/dynamic_memory_management
- Owner: peterajhgraham
- License: mit
- Created: 2024-08-17T19:35:29.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-19T19:04:03.000Z (3 months ago)
- Last Synced: 2024-08-20T22:49:40.405Z (3 months ago)
- Topics: memory-allocation, memory-management
- Language: C
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dynamic Memory Management
This project focuses on managing dynamic memory allocation in C using malloc, realloc, and free which is used to processes arrays of integers in various ways along with printing contents and displaying summary statistics. In the end all allocated memory is released.
## Directory Structure
```
Dynamic_Memory_Management/
├── src/
│ ├── main.c
│ ├── dynamic_array.c
│ └── dynamic_array.h
│
├── LICENSE
├── Makefile
└── README.md
```## How to Compile and Run
### Prerequisites
- A C compiler such as GNU C Compiler (GCC)
- `main` if using Makefile### Compilation
Navigate to `/Dynamic_Memory_Management/src` and compile program:
```
make
```
This will generate an executable named `main`.### Running the Program
Execute the Program with:
```
./main
```### Cleaning up
To remove compiled files, use:
```
make clean
```