Lines Matching refs:cinfo
190 print_mem_stats (j_common_ptr cinfo, int pool_id)
192 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
221 out_of_memory (j_common_ptr cinfo, int which)
226 cinfo->err->trace_level = 2; /* force self_destruct to report stats */
228 ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which);
261 alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
264 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
271 out_of_memory(cinfo, 1); /* request exceeds malloc's ability */
280 ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */
303 hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop);
308 out_of_memory(cinfo, 2); /* jpeg_get_small failed */
346 alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
349 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
355 out_of_memory(cinfo, 3); /* request exceeds malloc's ability */
364 ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */
366 hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject +
369 out_of_memory(cinfo, 4); /* jpeg_get_large failed */
399 alloc_sarray (j_common_ptr cinfo, int pool_id,
403 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
413 ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
421 result = (JSAMPARRAY) alloc_small(cinfo, pool_id,
428 workspace = (JSAMPROW) alloc_large(cinfo, pool_id,
447 alloc_barray (j_common_ptr cinfo, int pool_id,
451 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
461 ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
469 result = (JBLOCKARRAY) alloc_small(cinfo, pool_id,
476 workspace = (JBLOCKROW) alloc_large(cinfo, pool_id,
527 request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
532 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
537 ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */
540 result = (jvirt_sarray_ptr) alloc_small(cinfo, pool_id,
557 request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
562 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
567 ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */
570 result = (jvirt_barray_ptr) alloc_small(cinfo, pool_id,
587 realize_virt_arrays (j_common_ptr cinfo)
590 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
623 avail_mem = jpeg_mem_available(cinfo, space_per_minheight, maximum_space,
652 jpeg_open_backing_store(cinfo, & sptr->b_s_info,
658 sptr->mem_buffer = alloc_sarray(cinfo, JPOOL_IMAGE,
676 jpeg_open_backing_store(cinfo, & bptr->b_s_info,
682 bptr->mem_buffer = alloc_barray(cinfo, JPOOL_IMAGE,
694 do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing)
714 (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info,
718 (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info,
727 do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing)
747 (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info,
751 (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info,
760 access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
773 ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
779 ERREXIT(cinfo, JERR_VIRTUAL_BUG);
782 do_sarray_io(cinfo, ptr, TRUE);
807 do_sarray_io(cinfo, ptr, FALSE);
816 ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
833 ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
845 access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr,
858 ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
864 ERREXIT(cinfo, JERR_VIRTUAL_BUG);
867 do_barray_io(cinfo, ptr, TRUE);
892 do_barray_io(cinfo, ptr, FALSE);
901 ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
918 ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);
934 free_pool (j_common_ptr cinfo, int pool_id)
936 my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
942 ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */
945 if (cinfo->err->trace_level > 1)
946 print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */
957 (*sptr->b_s_info.close_backing_store) (cinfo, & sptr->b_s_info);
964 (*bptr->b_s_info.close_backing_store) (cinfo, & bptr->b_s_info);
979 jpeg_free_large(cinfo, (void FAR *) lhdr_ptr, space_freed);
993 jpeg_free_small(cinfo, (void *) shdr_ptr, space_freed);
1002 * Note that this cannot be called unless cinfo->mem is non-NULL.
1006 self_destruct (j_common_ptr cinfo)
1015 free_pool(cinfo, pool);
1019 jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr));
1020 cinfo->mem = NULL; /* ensures I will be called only once */
1022 jpeg_mem_term(cinfo); /* system-dependent cleanup */
1028 * When this is called, only the error manager pointer is valid in cinfo!
1032 jinit_memory_mgr (j_common_ptr cinfo)
1039 cinfo->mem = NULL; /* for safety if init fails */
1049 ERREXIT(cinfo, JERR_BAD_ALIGN_TYPE);
1058 ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
1060 max_to_use = jpeg_mem_init(cinfo); /* system-dependent initialization */
1063 mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr));
1066 jpeg_mem_term(cinfo); /* system-dependent cleanup */
1067 ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0);
1099 cinfo->mem = & mem->pub;