Lines Matching refs:pool

12  *   * pool-based allocation and freeing of memory;
78 * We allocate objects from "pools", where each pool is gotten with a single
80 * overhead within a pool, except for alignment padding. Each pool has a
81 * header with a link to the next pool of the same class.
82 * Small and large pool headers are identical except that the latter's
94 size_t bytes_used; /* how many bytes already used within pool */
95 size_t bytes_left; /* bytes still available in this pool */
105 size_t bytes_used; /* how many bytes already used within pool */
106 size_t bytes_left; /* bytes still available in this pool */
119 /* Each pool identifier (lifetime class) names a linked list of pools. */
126 * in the small-pool list.
145 * Note that these blocks are allocated in the "small" pool area.
196 fprintf(stderr, "Freeing pool %d, total space = %ld\n",
231 * For these, we use pooled storage. When a new pool must be created,
233 * where the slop will be the amount of leftover space in the new pool.
235 * A different slop value is provided for each pool class (lifetime),
236 * and we also distinguish the first pool of a class from later ones.
243 1600, /* first PERMANENT pool */
244 16000 /* first IMAGE pool */
274 /* See if space is available in any existing pool */
281 break; /* found pool with enough space */
286 /* Time to make a new pool? */
290 if (prev_hdr_ptr == NULL) /* first pool in class? */
307 /* Success, initialize the new pool header and add to end of list */
311 if (prev_hdr_ptr == NULL) /* first pool in class? */
317 /* OK, allocate the object from the current pool */
318 data_ptr = (char *) (hdr_ptr + 1); /* point to first data byte in pool */
331 * except that FAR pointers are used on 80x86. However the pool
334 * jpeg_get_large; the pool management just links everything together
358 /* Always make a new pool */
368 /* Success, initialize the new pool header and add to list */
370 /* We maintain space counts in each pool header for statistical purposes,
377 return (void FAR *) (hdr_ptr + 1); /* point to first data byte in pool */
926 * Release all objects belonging to a specified pool.
942 print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */
945 /* If freeing IMAGE pool, close any virtual arrays first */
1004 int pool;
1010 for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) {
1011 free_pool(cinfo, pool);
1032 int pool;
1085 for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) {
1086 mem->small_list[pool] = NULL;
1087 mem->large_list[pool] = NULL;