Aryan Kspaciouscoder78.hashnode.dev·Mar 11, 2024Dynamic Memory Allocation in C Using malloc()C is a very old language, with its existence dating back to 1970s. It has been the most influential language in the world with pretty much everything around us. Our Operating systems, routers and many other devices run using C. Despite being that inf...DiscussProgrammingC
Oladimeji Alabi Taofeekdimcoder.hashnode.dev·Jan 30, 2024A Beginner's Guide to Pointers in C: Understanding and ApplicationIntroducing the C programming language The C language was developed in 1972 at At&T Bell Labs by Dennis Ritchie. It combines features of the B and BCPL (Basic Combined Programming Language) programming languages but is also mixed with the Pascal lang...Discuss·12 likes·69 readspointers
Bhanuprakash Eagalabhanuprakasheagala.hashnode.dev·Jan 27, 2024Heap Memory Allocator in C ProgrammingHi System Devs, Hope you are doing well! In this third and final instalment of article, we cover the implementation of the C library functions free(), calloc(), and realloc(). Please Read the following two Parts before proceeding further: PART 1 : In...Discuss·65 readsc programming
Bhanuprakash Eagalabhanuprakasheagala.hashnode.dev·Jan 20, 2024Heap Memory Allocator in C ProgrammingGreetings, Systems devs! In this article on Building our own Memory Allocator, we dive into malloc library function. Please first read PART1 to understand sbrk() system call provided by Linux. malloc(size) function allocates the size bytes of memory ...Discuss·45 readsmemory-management
Plínio Hávilapliniohavila.hashnode.dev·Jan 2, 2024Notas introdutórias à ferramenta Address SanitizerA Address Sanitizer, ASan, é uma ferramenta que permite identificar erros de memória em tempo de execução. Em outras palavras, quando executamos nossos programa e ocorre algum erro de memória: a ASan acusa a ocorrência do problema, bem como interromp...Discuss#clanguage
Jyotiprakash Mishrablog.jyotiprakash.org·Dec 28, 2023Bigger Example 3: Dynamic ArrayQuestion: Implement a dynamic array data structure in C that supports the following operations: Initialization with an initial capacity. Accessing an element at a given index. Setting the value at a given index. Inserting a new element at a speci...DiscussC Programmingarray
Jyotiprakash Mishrablog.jyotiprakash.org·Dec 27, 2023Memory leaks can leave you broke!In C, a memory leak occurs when a program allocates memory dynamically (using functions like malloc or calloc) but fails to deallocate or release that memory when it is no longer needed. Memory leaks can lead to a gradual increase in memory usage by ...DiscussC ProgrammingMemory Leak
Jyotiprakash Mishrablog.jyotiprakash.org·Dec 27, 2023Basic Dynamic Memory Allocation Programming QuestionsHere are 10 C programming exercises that involve dynamic memory allocation: Dynamic Array: Create a program that dynamically allocates memory for an array of integers. Allow the user to input the size of the array and elements, and then print the ar...Discuss·724 readsC Programmingdynamic memory allocation
Jyotiprakash Mishrablog.jyotiprakash.org·Dec 24, 2023Where do your variables live?Let's discuss stack and heap memory allocation in C with some sample code. Stack Allocation: Stack memory is used for storing local variables and function call information. The compiler automatically manages it. #include <stdio.h> // when stackEx...Discuss·27 readsC Programmingstack
Harsh Agarwallinuxkernel.hashnode.dev·Dec 21, 2023Magic of Malloc - Behind the ScenesDynamic memory allocation in C is a fundamental concept, and most of us are familiar with the infamous malloc function. However, did you know that "malloc" isn't a system call itself but rather a clever interface built on top of the brk() and mmap() ...Discuss·226 readsC