Free
trouble with structs and malloc()/free()
I\'m trying to map a doubly linked list to a GUI. I basically create a button structure for every node in the list, map the nodes parameters to the buttons parameters, and then display them on the scr[详细]
2023-03-07 22:08 分类:问答How to make valgrind report an error when there are still reachable allocs
I\'m writing a compiler that produces C code.The programs produced consist only of the main function, and they use a lot of memory, that is allocated with malloc().Most开发者_JAVA百科 of the memory al[详细]
2023-03-07 12:15 分类:问答Problem with free() on structs in C. It doesn't reduce memory usage
I\'m having a problem with free() on a struct in my C program. When I look at /proc//statm before and after the free it doesn\'t seem to reduce. Am I using free() wrong in this case, or am I reading /[详细]
2023-03-05 18:38 分类:问答Problem usage memory in C
Please help :) OS : Linux Where in \" sleep(1000);\", at this time \"top (display Linux tasks)\" wrote me 7.7 %MEM use.[详细]
2023-03-05 12:56 分类:问答Correct way to free memory
Makes a while since I\'ve done some C and I have to refresh my understanding of pointers. Here is a function that modifies the content of a pointer. The question is if this code is correct. Is it enou[详细]
2023-03-05 04:16 分类:问答Heap corruption while freeing memory
I have a class as follows struct CliHandler { CliHandler(int argc, char** argv); ~CliHandler(); int doWork();[详细]
2023-03-03 20:07 分类:问答Singly Linked List struct insert/delete multiple free
Been looking at this code for too long and I am getting gloomy any chance of figuring it out by myself has been lost :( anyone can tell me where am I being stupid? I just don\'t understand where I am[详细]
2023-02-28 19:03 分类:问答C: Freeing a malloc'd array at the wrong time?
I have a struct cell -> struct cell { double x, y, h, g, rhs; struct key *keys; }; And I\'m using the following method to free a cell ->[详细]
2023-02-26 05:41 分类:问答Problem in B-tree (not B+/B*) implemented with files in C
i\'m new here and first of all, i wanna apologize if i make errors in question. My problem is: i want to implement a B-tree in C, using a file to store the tree...my program reads 10000 strings of 10[详细]
2023-02-25 19:56 分类:问答How do I properly free certain malloc'd array elements?
I\'m using the following struct and methods: struct cell { double x, y, h, g, rhs; struct key *keys; }; void cellFree(struct cell *c){[详细]
2023-02-24 22:52 分类:问答