I am trying to trace a segfault with valgrind.I get the following message from valgrind: ==3683== Conditional jump or move de开发者_如何学运维pends on uninitialised value(s)
I need help with debugging this piece of code. I know the problem is in malloc and free but can\'t find exactly where, why and how to fix it. Please don\'t answer: \"Use gdb\" and that\'s it. I would
I have a small assignment in C. I am trying to create an array of pointers to a structure. My question is how can I initialize each pointer to NULL? Also, after I allocate memory for a member of the a
I am working on a program that requires me to make use of 4 matrices sized [1000][1000]. I have created them using malloc(), but when I try running the program 开发者_开发问答it just crashes and the
I\'ve read with interest the post C difference between malloc and calloc. I\'m using malloc in my code and would like to know what difference I\'ll have using calloc instead.
I have a segmentation fault in the code below, but after I changed it to poi开发者_如何学JAVAnter to pointer, it is fine. What is the reason?
I\'m trying to investigate the state of the C/C++ heap from within gdb on Linux amd64, is there a nice way to do this?
Why new()/delete() is slower than malloc()/free()? 开发者_Go百科EDIT: Thanks for the answers so far. Please kindly point out specifications of standard C++ implementation of new() and delete() if yo
开发者_Python百科In C++ using delete to free memory obtained with malloc() doesn\'t necessarily cause a program to blow up.
I\'m writing software to simulate the \"first-fit\" memory allocation schema. Basically, I allocate a large X megabyte chunk of memory and subdivide it into blocks when chunks are requested according