I am new to C and I am having trouble using dynamic memory. I malloc for struct figure and then realloc as needed. As I was trying to debug my code I noticed with the help of ddd that I overwrite one
I am trying to use dynamic memory for my code in C. I am using struct and I am doing something wrong, but I can\'t figure out what. The first part is part of my header(.h) file where I define both of
I\'m just reading about malloc() in C. The Wikipedia article provides an example, however it justs allocate enough memory f开发者_C百科or an array of 10 ints in comparison with int array[10]. Not ver
For some time now I\'ve been happily using dlmalloc for a cross-platform project (Windows, Mac OS X, Ubuntu).Recently, however, it seems that using dlmalloc leads to a crash-on-exit on Windows 7.
Malloc allocates memory from one of the virtual memory regions of the process called Heap. What is the initial size of the Heap (just after the execution begins and prior to any malloc call)? Say, if
I\'m trying to add 10 more elements to my struct that has been already malloc with a fixed sized of 20. This is the way I have my struct defined:
I have a error in my code. I become on mac a incorrect checksum for freed object and under Linux a malloc error. Can somebody help me?
I\'m studying up on OS memory management, and I wish to verify that I got the basic mechanism of allocation \\ virtual memory \\ paging straight.
I have been at this problem for the last 6 hours and have been hitting google like mad to no avail. Right I need a pointer to an array. This array contains pointers to Linked lists. Im going to have t
Seem to have a memory allocation problem and think it\'s because in my struct, there is a pointer to an array of another struct. However, I\'m not initializing this array and not sure how: