calloc
C access violation after using calloc
Note: C is Microsoft C Compiler. I\'m having trouble with the following code. *Roomsize = (int*)c开发者_如何学编程alloc(sizeof(int),sched->numberOfRooms);[详细]
2023-02-07 14:12 分类:问答very large memory allocation in 64-bit linux
I am trying to allocate a single very large piece of memory (>2.5gb) on a centos 64-bit linux. The hardware has more than 16gb physical memory. However, when I use malloc or calloc, they return null.[详细]
2023-01-31 13:56 分类:问答Difference in uses between malloc and calloc
gcc 4.5.1 c89 I have written this source code for my better understanding of malloc and calloc. I understand, but just have a few questions.[详细]
2023-01-27 10:26 分类:问答I'm very confused about malloc() and calloc() on C
I\'ve always programmed in Java, which is probably why I\'m so confused about this: In Java I declare a pointer:[详细]
2023-01-25 23:25 分类:问答Two arguments to calloc
Why does calloc take two arguments instead of one like malloc? Specifically, since there is no difference between (or is there?) between the following expressi开发者_开发技巧ons:[详细]
2023-01-23 19:50 分类:问答Initializing array inside struct - C?
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:[详细]
2023-01-22 03:49 分类:问答How to initialise a pointer to pointer struct in C?
I have a struct which is a node, and another which is a list of these nodes. In the list struct, its an array of nodes, but instead of an array, it\'s a pointer to pointer with a size integer:[详细]
2023-01-21 19:32 分类:问答Does any operating system implement buffering for malloc()?
A lot of c/malloc()\'s in a for/while/do can consume a lot of time so I am curious if any operating system buffers memory for fast mallocs.[详细]
2023-01-15 08:01 分类:问答C - calloc() v. malloc() [duplicate]
This question already has answers here: Closed 12 years ago. Possible Duplicate: c difference between malloc and calloc[详细]
2023-01-11 11:49 分类:问答calling calloc - memory leak valgrind
The following code is an example from the NCURSES menu library. I\'m not sure what could be wrong with the code, but valgrind reports some problems. Any ideas...[详细]
2023-01-01 08:52 分类:问答