A Deep Dive Into Memory

Dynamic memory allocation functions like malloc(), calloc(), realloc(), and free() are crucial in programming. The improved version, dlmalloc(), is widely adopted due to its efficiency. When called, these functions trigger system calls like brk()/sbrk() and mmap() to allocate memory. Understanding these processes is essential for efficient memory management in programming.

Read More A Deep Dive Into Memory

Memory Allocators PART-II

The “Best Fit” strategy in memory allocation finds the closest match, reducing wasted memory and working well with diverse request sizes. However, it can lead to increased fragmentation over time. While efficient, it may result in many tiny, unusable spaces in memory, posing a trade-off between immediate efficiency and potential long-term fragmentation.

Read More Memory Allocators PART-II

Memory Allocators PART-I

Memory allocation in embedded systems is crucial due to limited memory. Different algorithms like Sequential Fits, Best Fit, First Fit, Next Fit, Good Fit, Segregated Free Lists, Segregated Fits, Buddy System, Indexed Fits, and Bitmapped Fits optimize memory use based on various requirements. Each approach has its pros and cons, making them suitable for different scenarios.

Read More Memory Allocators PART-I

FIND AND GREP

This post provides essential commands for navigating directories on Ubuntu/Linux, making directory navigation easier. The post includes commands for searching for specific patterns within files, filtering by file type, and excluding certain directories. Each command is accompanied by a brief explanation and example. This valuable resource can greatly enhance your Linux command line skills.

Read More FIND AND GREP

ps – ?

The ‘ps’ command in Linux shows information about active processes. Options include displaying processes for the current shell, showing all processes on the system, providing full or long-format listings, showing processes not attached to a terminal, displaying all threads for a process, allowing custom formatting, sorting the output, and more. For further details, type ‘man ps’ on bash.

Read More ps – ?

GDB COMMANDS

This article by Yashwanth Naidu Tikkisetty provides a comprehensive list of gdb commands for debugging. It covers functions like info, set, watch, stepi, disassemble, and more, essential for efficient debugging in embedded systems. The post also emphasizes the importance of inspecting memory maps and displaying directory paths. For more details, visit the LinkedIn post.

Read More GDB COMMANDS

π‘Ίπ’†π’π’†π’„π’•π’Šπ’—π’† π‘­π’–π’π’„π’•π’Šπ’π’ π‘«π’†π’„π’π’‚π’“π’‚π’•π’Šπ’π’ 𝒐𝒗𝒆𝒓 𝒇𝒖𝒍𝒍 𝒉𝒆𝒂𝒅𝒆𝒓 π’Šπ’π’„π’π’–π’”π’Šπ’π’π’”

In embedded systems, optimizing code size is critical. Including only necessary function declarations can reduce memory usage and improve build times. However, this approach may impact code readability, portability, and error risk. Striking a balance and prioritizing clear documentation is key for successful implementation in resource-limited environments.

Read More π‘Ίπ’†π’π’†π’„π’•π’Šπ’—π’† π‘­π’–π’π’„π’•π’Šπ’π’ π‘«π’†π’„π’π’‚π’“π’‚π’•π’Šπ’π’ 𝒐𝒗𝒆𝒓 𝒇𝒖𝒍𝒍 𝒉𝒆𝒂𝒅𝒆𝒓 π’Šπ’π’„π’π’–π’”π’Šπ’π’π’”

GCC – ?

The gcc commands cover optimizations, profiling, security, and low-level operations, essential for embedded systems and performance-critical applications. Techniques include Link-Time Optimizations, dependency file generation, controlling inline functions, architecture-specific optimizations, and static analysis. These techniques prioritize efficient, secure, and compact code in memory-constrained embedded systems.

Read More GCC – ?

π‘«π’†π’‚π’…π’π’π’„π’Œ π’–π’”π’Šπ’π’ˆ π’‡π’Šπ’‡π’

This post demonstrates a deadlock scenario using two FIFOs and a client-server model. The deadlock occurs when both the server and client wait for each other to send a message, resulting in a standstill. The article also outlines steps to avoid deadlock by following a specific sequence of actions.

Read More π‘«π’†π’‚π’…π’π’π’„π’Œ π’–π’”π’Šπ’π’ˆ π’‡π’Šπ’‡π’

𝑾𝒉𝒂𝒕 π’Šπ’” 𝒂 𝑭𝑰𝑭𝑢?

Named pipes, also known as FIFOs, are essential in inter-process communication. They embody the “First In, First Out” concept, serving as intermediaries between processes. Positioned within the file system, they enable seamless communication and offer persistence and flexibility. Understanding named pipes is key to fully appreciate Linux’s capabilities and empower your programming endeavors.

Read More 𝑾𝒉𝒂𝒕 π’Šπ’” 𝒂 𝑭𝑰𝑭𝑢?