Home | History | Annotate | Download | only in jpeg

Lines Matching refs:slop

232  * we try to get enough space for the current request plus a "slop" factor,
233 * where the slop will be the amount of leftover space in the new pool.
234 * The speed vs. space tradeoff is largely determined by the slop values.
235 * A different slop value is provided for each pool class (lifetime),
263 size_t odd_bytes, min_request, slop;
288 /* min_request is what we need now, slop is what will be leftover */
291 slop = first_pool_slop[pool_id];
293 slop = extra_pool_slop[pool_id];
295 if (slop > (size_t) (MAX_ALLOC_CHUNK-min_request))
296 slop = (size_t) (MAX_ALLOC_CHUNK-min_request);
297 /* Try to get space, if fail reduce slop and try again */
299 hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop);
302 slop /= 2;
303 if (slop < MIN_SLOP) /* give up when it gets real small */
306 mem->total_space_allocated += min_request + slop;
310 hdr_ptr->hdr.bytes_left = sizeofobject + slop;