Lines Matching defs:mem

192   my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
201 pool_id, mem->total_space_allocated);
203 for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL;
209 for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL;
264 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
282 hdr_ptr = mem->small_list[pool_id];
310 mem->total_space_allocated += min_request + slop;
316 mem->small_list[pool_id] = hdr_ptr;
349 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
370 mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr);
373 hdr_ptr->hdr.next = mem->large_list[pool_id];
379 mem->large_list[pool_id] = hdr_ptr;
393 * this chunking of rows. The rowsperchunk value is left in the mem manager
403 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
418 mem->last_rowsperchunk = rowsperchunk;
451 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
466 mem->last_rowsperchunk = rowsperchunk;
532 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
549 result->next = mem->virt_sarray_list; /* add to list of virtual arrays */
550 mem->virt_sarray_list = result;
562 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
579 result->next = mem->virt_barray_list; /* add to list of virtual arrays */
580 mem->virt_barray_list = result;
590 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
602 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
610 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
624 mem->total_space_allocated);
643 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
660 sptr->rowsperchunk = mem->last_rowsperchunk;
667 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
684 bptr->rowsperchunk = mem->last_rowsperchunk;
936 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
954 for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {
960 mem->virt_sarray_list = NULL;
961 for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {
967 mem->virt_barray_list = NULL;
971 lhdr_ptr = mem->large_list[pool_id];
972 mem->large_list[pool_id] = NULL;
980 mem->total_space_allocated -= space_freed;
985 shdr_ptr = mem->small_list[pool_id];
986 mem->small_list[pool_id] = NULL;
994 mem->total_space_allocated -= space_freed;
1002 * Note that this cannot be called unless cinfo->mem is non-NULL.
1019 jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr));
1020 cinfo->mem = NULL; /* ensures I will be called only once */
1034 my_mem_ptr mem;
1039 cinfo->mem = NULL; /* for safety if init fails */
1063 mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr));
1065 if (mem == NULL) {
1071 mem->pub.alloc_small = alloc_small;
1072 mem->pub.alloc_large = alloc_large;
1073 mem->pub.alloc_sarray = alloc_sarray;
1074 mem->pub.alloc_barray = alloc_barray;
1075 mem->pub.request_virt_sarray = request_virt_sarray;
1076 mem->pub.request_virt_barray = request_virt_barray;
1077 mem->pub.realize_virt_arrays = realize_virt_arrays;
1078 mem->pub.access_virt_sarray = access_virt_sarray;
1079 mem->pub.access_virt_barray = access_virt_barray;
1080 mem->pub.free_pool = free_pool;
1081 mem->pub.self_destruct = self_destruct;
1084 mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK;
1087 mem->pub.max_memory_to_use = max_to_use;
1090 mem->small_list[pool] = NULL;
1091 mem->large_list[pool] = NULL;
1093 mem->virt_sarray_list = NULL;
1094 mem->virt_barray_list = NULL;
1096 mem->total_space_allocated = SIZEOF(my_memory_mgr);
1099 cinfo->mem = & mem->pub;
1118 mem->pub.max_memory_to_use = max_to_use * 1000L;