-
Stack Usage in System Design
What is a Stack in C : A stack is a Last-In-First-Out (LIFO) data structure used to store temporary data like function calls, local variables, and return addresses. In embedded Linux, stacks are crucial for managing interrupt service routines (ISRs) and context switching. Each process or thread has its own stack, and the kernel uses…
-
Circular Buffer
What is a Circular Buffer A circular buffer, also known as a ring buffer, is a fixed-size data structure that wraps around when it reaches the end. Unlike a linear buffer, it uses two pointers — head and tail — to manage data efficiently without shifting elements. It’s ideal for scenarios where data is continuously produced and consumed, such as in…
-
Memory Management
What is Memory Management in C : Memory management in C refers to how programs allocate, use, and free memory during execution. In embedded Linux, this is critical due to limited RAM, real-time constraints, and direct hardware access. C provides manual memory control using: Stack and heap – for automatic vs. manual memory malloc() /…