Lines Matching refs:mem
190 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
199 pool_id, mem->total_space_allocated);
201 for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL;
207 for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL;
262 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
280 hdr_ptr = mem->small_list[pool_id];
308 mem->total_space_allocated += min_request + slop;
314 mem->small_list[pool_id] = hdr_ptr;
347 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
368 mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr);
371 hdr_ptr->hdr.next = mem->large_list[pool_id];
377 mem->large_list[pool_id] = hdr_ptr;
391 * this chunking of rows. The rowsperchunk value is left in the mem manager
401 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
416 mem->last_rowsperchunk = rowsperchunk;
449 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
464 mem->last_rowsperchunk = rowsperchunk;
530 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
547 result->next = mem->virt_sarray_list; /* add to list of virtual arrays */
548 mem->virt_sarray_list = result;
560 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
577 result->next = mem->virt_barray_list; /* add to list of virtual arrays */
578 mem->virt_barray_list = result;
588 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
600 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
608 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
622 mem->total_space_allocated);
641 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
658 sptr->rowsperchunk = mem->last_rowsperchunk;
665 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
682 bptr->rowsperchunk = mem->last_rowsperchunk;
934 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
952 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
958 mem->virt_sarray_list = NULL;
959 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
965 mem->virt_barray_list = NULL;
969 lhdr_ptr = mem->large_list[pool_id];
970 mem->large_list[pool_id] = NULL;
978 mem->total_space_allocated -= space_freed;
983 shdr_ptr = mem->small_list[pool_id];
984 mem->small_list[pool_id] = NULL;
992 mem->total_space_allocated -= space_freed;
1000 * Note that this cannot be called unless cinfo->mem is non-NULL.
1017 jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr));
1018 cinfo->mem = NULL; /* ensures I will be called only once */
1032 my_mem_ptr mem;
1037 cinfo->mem = NULL; /* for safety if init fails */
1061 mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr));
1063 if (mem == NULL) {
1069 mem->pub.alloc_small = alloc_small;
1070 mem->pub.alloc_large = alloc_large;
1071 mem->pub.alloc_sarray = alloc_sarray;
1072 mem->pub.alloc_barray = alloc_barray;
1073 mem->pub.request_virt_sarray = request_virt_sarray;
1074 mem->pub.request_virt_barray = request_virt_barray;
1075 mem->pub.realize_virt_arrays = realize_virt_arrays;
1076 mem->pub.access_virt_sarray = access_virt_sarray;
1077 mem->pub.access_virt_barray = access_virt_barray;
1078 mem->pub.free_pool = free_pool;
1079 mem->pub.self_destruct = self_destruct;
1082 mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK;
1085 mem->pub.max_memory_to_use = max_to_use;
1088 mem->small_list[pool] = NULL;
1089 mem->large_list[pool] = NULL;
1091 mem->virt_sarray_list = NULL;
1092 mem->virt_barray_list = NULL;
1094 mem->total_space_allocated = SIZEOF(my_memory_mgr);
1097 cinfo->mem = & mem->pub;
1114 mem->pub.max_memory_to_use = max_to_use * 1000L;