Lines Matching defs:memory
23 * download data into a chunk of memory instead of storing it in a file.
33 char *memory;
44 mem->memory = realloc(mem->memory, mem->size + realsize + 1);
45 if(mem->memory == NULL) {
46 /* out of memory! */
47 printf("not enough memory (realloc returned NULL)\n");
51 memcpy(&(mem->memory[mem->size]), contents, realsize);
53 mem->memory[mem->size] = 0;
66 chunk.memory = malloc(1); /* will be grown as needed by the realloc above */
97 * Now, our chunk.memory points to a memory block that is chunk.size
109 if(chunk.memory)
110 free(chunk.memory);