Top "Malloc" questions

The malloc function performs dynamic memory allocation in C and is part of the standard library.

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: …

c arrays malloc calloc
LinkedList - How to free the memory allocated using malloc

I have a very simple C code for constructing a Singly Linked list as below, in which I allocate memory …

c linked-list malloc free
C - calloc() v. malloc()

Possible Duplicate: c difference between malloc and calloc Please explain the significance of this statement, Another difference between the malloc() …

c malloc calloc
aligned malloc() in GCC?

Is there any standardized function in GCC or glibc to allocate memory block at aligned pointer? Like _align_malloc() in …

c gcc malloc
What's the point of malloc(0)?

I just saw this code: artist = (char *) malloc(0); ...and I was wondering why would one do this?

c malloc
difference between <stdlib.h> and <malloc.h>

When I use malloc in a C program, I get a warning: warning: incompatible implicit declaration of built-in function 'malloc' […

c gcc malloc
When and why to use malloc?

Well, I can't understand when and why it is needed to allocate memory using malloc. Here is my code : #include &…

c malloc dynamic-memory-allocation
realloc(): invalid next size when reallocating to make space for strcat on char *

I am getting invalid memory error on following code: printf(" %s\n","FINE 5"); printf("%s LENGTH IS: %d\n","FINE 6",…

c string malloc realloc strcat
How to determine the size of an allocated C buffer?

I have a buffer and want to do a test to see if the buffer has sufficient capacity I.e. …

c malloc buffer buffer-overflow
Malloc error "can't allocate region" failed with error code 12. Any idea how to resolve this?

i am getting this error and dont know what to do with that: AppName(3786,0xa0810540) malloc: *** mmap(size=16777216) failed (error …

ios memory-management malloc allocation