B
Bill Cunningham
I am wanting to write a text reader involving fgetc and a loop but need
to alloc memory of courses. At first I thought of malloc but would calloc
have a better use for this. This function would also need to realloc and
free memory. I've done this before but with a set buffer size and memory was
wasted. int buff[5000]; for example. I need a buffer that would grow and
then be freed. So how is calloc different than malloc. Also is valloc part
of the standard? It shows up on the online man page.
Bill
to alloc memory of courses. At first I thought of malloc but would calloc
have a better use for this. This function would also need to realloc and
free memory. I've done this before but with a set buffer size and memory was
wasted. int buff[5000]; for example. I need a buffer that would grow and
then be freed. So how is calloc different than malloc. Also is valloc part
of the standard? It shows up on the online man page.
Bill