Lines Matching refs:mem

194   my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
203 pool_id, mem->total_space_allocated);
205 for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL;
211 for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL;
270 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
297 hdr_ptr = mem->small_list[pool_id];
325 mem->total_space_allocated += min_request + slop;
331 mem->small_list[pool_id] = hdr_ptr;
366 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
396 mem->total_space_allocated += sizeofobject + sizeof(large_pool_hdr) +
400 hdr_ptr->next = mem->large_list[pool_id];
406 mem->large_list[pool_id] = hdr_ptr;
424 * this chunking of rows. The rowsperchunk value is left in the mem manager
438 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
465 mem->last_rowsperchunk = rowsperchunk;
498 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
517 mem->last_rowsperchunk = rowsperchunk;
583 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
600 result->next = mem->virt_sarray_list; /* add to list of virtual arrays */
601 mem->virt_sarray_list = result;
613 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
630 result->next = mem->virt_barray_list; /* add to list of virtual arrays */
631 mem->virt_barray_list = result;
641 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
653 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
665 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
683 mem->total_space_allocated);
702 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
719 sptr->rowsperchunk = mem->last_rowsperchunk;
726 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
743 bptr->rowsperchunk = mem->last_rowsperchunk;
995 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
1013 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
1019 mem->virt_sarray_list = NULL;
1020 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
1026 mem->virt_barray_list = NULL;
1030 lhdr_ptr = mem->large_list[pool_id];
1031 mem->large_list[pool_id] = NULL;
1039 mem->total_space_allocated -= space_freed;
1044 shdr_ptr = mem->small_list[pool_id];
1045 mem->small_list[pool_id] = NULL;
1053 mem->total_space_allocated -= space_freed;
1061 * Note that this cannot be called unless cinfo->mem is non-NULL.
1078 jpeg_free_small(cinfo, (void *) cinfo->mem, sizeof(my_memory_mgr));
1079 cinfo->mem = NULL; /* ensures I will be called only once */
1093 my_mem_ptr mem;
1098 cinfo->mem = NULL; /* for safety if init fails */
1122 mem = (my_mem_ptr) jpeg_get_small(cinfo, sizeof(my_memory_mgr));
1124 if (mem == NULL) {
1130 mem->pub.alloc_small = alloc_small;
1131 mem->pub.alloc_large = alloc_large;
1132 mem->pub.alloc_sarray = alloc_sarray;
1133 mem->pub.alloc_barray = alloc_barray;
1134 mem->pub.request_virt_sarray = request_virt_sarray;
1135 mem->pub.request_virt_barray = request_virt_barray;
1136 mem->pub.realize_virt_arrays = realize_virt_arrays;
1137 mem->pub.access_virt_sarray = access_virt_sarray;
1138 mem->pub.access_virt_barray = access_virt_barray;
1139 mem->pub.free_pool = free_pool;
1140 mem->pub.self_destruct = self_destruct;
1143 mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK;
1146 mem->pub.max_memory_to_use = max_to_use;
1149 mem->small_list[pool] = NULL;
1150 mem->large_list[pool] = NULL;
1152 mem->virt_sarray_list = NULL;
1153 mem->virt_barray_list = NULL;
1155 mem->total_space_allocated = sizeof(my_memory_mgr);
1158 cinfo->mem = & mem->pub;
1175 mem->pub.max_memory_to_use = max_to_use * 1000L;