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