Skip to content

About

What I Learned - Variables & Data Types - Operators - Conditional Statements - Loops - Functions - Arrays & Strings - Pointers - Structures & Unions - Dynamic Memory Allocation

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 C-Masterclass: Low-Level System Architecture

C Programming Build Focus

Welcome to my C Programming Foundation repository. This is a comprehensive, meticulously documented codebase representing an intensive developer sprint through the absolute core of computer science.

Rather than just learning syntax, this repository was built to understand what happens under the hood—raw memory layout, low-level pointer manipulation, permanent storage systems, and dynamic execution models.


📂 The 11-Chapter Architecture

The codebase is modularly divided into 11 core engineering concepts. Each directory contains standalone .c scripts demonstrating mastery over specific system-level mechanics.

Module Core Concepts Engineered Key Milestones Achieved
01. Variables & Data Types Primitive types, memory sizes, format specifiers. Mapped raw byte allocations in RAM.
02. Instructions & Operators Type casting, mathematical precedence, logic gates. Evaluated rigid binary order of operations.
03. Conditional Flow if-else ladders, switch-case states, nested logic. Constructed dynamic routing architectures.
04. Loop Control for, while, do-while iteration engines. Optimized infinite loops and logical breakpoints.
05. Functions & Recursion Procedural abstraction and call stack manipulation. Built decoupled, reusable processing units.
06. Pointers Raw memory addresses (&) and dereferencing (*). Mastered pass-by-reference data manipulation.
07. Arrays Contiguous memory allocation and multi-dimensional matrices. Tracked and parsed array head pointer addresses.
08. Strings Character arrays and null-terminator (\0) mapping. Engineered custom tokenization and parsing logic.
09. Structures (struct) Custom data payloads and memory-packed object layouts. Formulated schemas for database asset management.
10. File I/O Persistent data pipelines (fscanf, fprintf), EOF handling. Built input/output engines for text state logging.
11. Dynamic Memory Heap allocation (malloc, calloc), resizing (realloc). Managed runtime RAM allocation and prevented leaks using free().

🧠 Core Engineering Principles

Throughout this sprint, this codebase was held to strict system-level design metrics:

  • Asset-Light Operations: Designed loops and tracking metrics to maintain clear data processing pipelines without bloat.
  • Memory Defenses: Enforced type-safe checking parameters on pointer targets to prevent memory overflows.
  • Clean Destructors: Maintained clear resource tracking to guarantee that every heap block opened via allocation was systematically closed to prevent memory leaks.

🛠️ Compilation & Local Deployment

To run any of the foundational modules locally on a native Linux, Unix, or Windows (via MinGW) environment, ensure you have the gcc compiler collection installed.

1. Clone the repository

git clone https://github.com/kongogaming/11_Dynamic_Memory.git
cd 11_Dynamic_Memory

2. Compile the desired program

gcc memory_allocation_script.c -o executed_script

Replace memory_allocation_script.c with the filename of any C source file you want to compile.

3. Execute the program

./executed_script

The program will run directly in the terminal, demonstrating concepts of dynamic memory allocation such as malloc(), calloc(), realloc(), and free().


📚 Topics Covered

  • Dynamic Memory Allocation
  • malloc()
  • calloc()
  • realloc()
  • free()
  • Memory Leaks
  • Pointer Arithmetic
  • Heap vs Stack Memory
  • Safe Memory Management Practices

📝 Notes

  • All programs are written in standard C.
  • Compile each source file individually using GCC.
  • Every program is designed to demonstrate one or more dynamic memory management concepts.
  • Tested using GCC on Linux and Windows (MinGW).

🎯 Project Goal

This repository serves as my practical implementation of Dynamic Memory concepts in C. It strengthens my understanding of heap management, pointers, and efficient memory usage—fundamental skills for systems programming, operating systems, embedded development, high-performance software, and future studies in Data Structures, Algorithms, and Object-Oriented Programming.


🚀 Next Step

With Dynamic Memory completed, the journey continues toward mastering Data Structures, Algorithms, Object-Oriented Programming, and building scalable software systems.

Every line of code written here is another step toward becoming a better software engineer.

Happy Coding! 💻🚀

About

What I Learned - Variables & Data Types - Operators - Conditional Statements - Loops - Functions - Arrays & Strings - Pointers - Structures & Unions - Dynamic Memory Allocation

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages