Home | History | Annotate | Download | only in examples

Lines Matching defs:memory

24  * chunk of memory instead of storing it in a file.
35 char *memory;
45 mem->memory = realloc(mem->memory, mem->size + realsize + 1);
46 if(mem->memory == NULL) {
47 /* out of memory! */
48 printf("not enough memory (realloc returned NULL)\n");
52 memcpy(&(mem->memory[mem->size]), contents, realsize);
54 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 free(chunk.memory);