Lines Matching refs:mem
188 my_mem_ptr mem = (my_mem_ptr) cinfo->mem; in print_mem_stats() local
197 pool_id, mem->total_space_allocated); in print_mem_stats()
199 for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL; in print_mem_stats()
205 for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL; in print_mem_stats()
260 my_mem_ptr mem = (my_mem_ptr) cinfo->mem; in alloc_small() local
278 hdr_ptr = mem->small_list[pool_id]; in alloc_small()
306 mem->total_space_allocated += min_request + slop; in alloc_small()
312 mem->small_list[pool_id] = hdr_ptr; in alloc_small()
345 my_mem_ptr mem = (my_mem_ptr) cinfo->mem; in alloc_large() local
366 mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr); in alloc_large()
369 hdr_ptr->hdr.next = mem->large_list[pool_id]; in alloc_large()
375 mem->large_list[pool_id] = hdr_ptr; in alloc_large()
399 my_mem_ptr mem = (my_mem_ptr) cinfo->mem; in alloc_sarray() local
414 mem->last_rowsperchunk = rowsperchunk; in alloc_sarray()
447 my_mem_ptr mem = (my_mem_ptr) cinfo->mem; in alloc_barray() local
462 mem->last_rowsperchunk = rowsperchunk; in alloc_barray()
528 my_mem_ptr mem = (my_mem_ptr) cinfo->mem; in request_virt_sarray() local
545 result->next = mem->virt_sarray_list; /* add to list of virtual arrays */ in request_virt_sarray()
546 mem->virt_sarray_list = result; in request_virt_sarray()
558 my_mem_ptr mem = (my_mem_ptr) cinfo->mem; in request_virt_barray() local
575 result->next = mem->virt_barray_list; /* add to list of virtual arrays */ in request_virt_barray()
576 mem->virt_barray_list = result; in request_virt_barray()
586 my_mem_ptr mem = (my_mem_ptr) cinfo->mem; in realize_virt_arrays() local
598 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { in realize_virt_arrays()
606 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { in realize_virt_arrays()
620 mem->total_space_allocated); in realize_virt_arrays()
639 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { in realize_virt_arrays()
656 sptr->rowsperchunk = mem->last_rowsperchunk; in realize_virt_arrays()
663 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { in realize_virt_arrays()
680 bptr->rowsperchunk = mem->last_rowsperchunk; in realize_virt_arrays()
932 my_mem_ptr mem = (my_mem_ptr) cinfo->mem; in free_pool() local
950 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { in free_pool()
956 mem->virt_sarray_list = NULL; in free_pool()
957 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { in free_pool()
963 mem->virt_barray_list = NULL; in free_pool()
967 lhdr_ptr = mem->large_list[pool_id]; in free_pool()
968 mem->large_list[pool_id] = NULL; in free_pool()
976 mem->total_space_allocated -= space_freed; in free_pool()
981 shdr_ptr = mem->small_list[pool_id]; in free_pool()
982 mem->small_list[pool_id] = NULL; in free_pool()
990 mem->total_space_allocated -= space_freed; in free_pool()
1015 jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr)); in self_destruct()
1016 cinfo->mem = NULL; /* ensures I will be called only once */ in self_destruct()
1030 my_mem_ptr mem; in jinit_memory_mgr() local
1035 cinfo->mem = NULL; /* for safety if init fails */ in jinit_memory_mgr()
1059 mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr)); in jinit_memory_mgr()
1061 if (mem == NULL) { in jinit_memory_mgr()
1067 mem->pub.alloc_small = alloc_small; in jinit_memory_mgr()
1068 mem->pub.alloc_large = alloc_large; in jinit_memory_mgr()
1069 mem->pub.alloc_sarray = alloc_sarray; in jinit_memory_mgr()
1070 mem->pub.alloc_barray = alloc_barray; in jinit_memory_mgr()
1071 mem->pub.request_virt_sarray = request_virt_sarray; in jinit_memory_mgr()
1072 mem->pub.request_virt_barray = request_virt_barray; in jinit_memory_mgr()
1073 mem->pub.realize_virt_arrays = realize_virt_arrays; in jinit_memory_mgr()
1074 mem->pub.access_virt_sarray = access_virt_sarray; in jinit_memory_mgr()
1075 mem->pub.access_virt_barray = access_virt_barray; in jinit_memory_mgr()
1076 mem->pub.free_pool = free_pool; in jinit_memory_mgr()
1077 mem->pub.self_destruct = self_destruct; in jinit_memory_mgr()
1080 mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK; in jinit_memory_mgr()
1083 mem->pub.max_memory_to_use = max_to_use; in jinit_memory_mgr()
1086 mem->small_list[pool] = NULL; in jinit_memory_mgr()
1087 mem->large_list[pool] = NULL; in jinit_memory_mgr()
1089 mem->virt_sarray_list = NULL; in jinit_memory_mgr()
1090 mem->virt_barray_list = NULL; in jinit_memory_mgr()
1092 mem->total_space_allocated = SIZEOF(my_memory_mgr); in jinit_memory_mgr()
1095 cinfo->mem = & mem->pub; in jinit_memory_mgr()
1112 mem->pub.max_memory_to_use = max_to_use * 1000L; in jinit_memory_mgr()