Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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
```