Lines Matching refs:chunk
23 * download data into a chunk of memory instead of storing it in a file.
63 struct MemoryStruct chunk;
65 chunk.memory = malloc(1); /* will be grown as needed by the realloc above */
66 chunk.size = 0; /* no data at this point */
79 /* we pass our 'chunk' struct to the callback function */
80 curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
93 * Now, our chunk.memory points to a memory block that is chunk.size
103 printf("%lu bytes retrieved\n", (long)chunk.size);
105 if(chunk.memory)
106 free(chunk.memory);