pngcrush  1.8.13
About: Pngcrush is an optimizer for PNG (Portable Network Graphics) files.
  Fossies Dox: pngcrush-1.8.13.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

pngmem.c File Reference
#include "pngpriv.h"
Include dependency graph for pngmem.c:

Go to the source code of this file.

Functions

void png_destroy_png_struct (png_structrp png_ptr)
 
png_voidp png_calloc (png_const_structrp png_ptr, png_alloc_size_t size)
 
png_voidp png_malloc_base (png_const_structrp png_ptr, png_alloc_size_t size)
 
static png_voidp png_malloc_array_checked (png_const_structrp png_ptr, int nelements, size_t element_size)
 
png_voidp png_malloc_array (png_const_structrp png_ptr, int nelements, size_t element_size)
 
png_voidp png_realloc_array (png_const_structrp png_ptr, png_const_voidp old_array, int old_elements, int add_elements, size_t element_size)
 
png_voidp png_malloc (png_const_structrp png_ptr, png_alloc_size_t size)
 
png_voidp png_malloc_default (png_const_structrp png_ptr, png_alloc_size_t size)
 
png_voidp png_malloc_warn (png_const_structrp png_ptr, png_alloc_size_t size)
 
void png_free (png_const_structrp png_ptr, png_voidp ptr)
 
void png_free_default (png_const_structrp png_ptr, png_voidp ptr)
 
void png_set_mem_fn (png_structrp png_ptr, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)
 
png_voidp png_get_mem_ptr (png_const_structrp png_ptr)
 

Function Documentation

◆ png_calloc()

◆ png_destroy_png_struct()

void png_destroy_png_struct ( png_structrp  png_ptr)

Definition at line 25 of file pngmem.c.

References png_free(), and png_free_jmpbuf().

Referenced by png_destroy_read_struct(), and png_destroy_write_struct().

◆ png_free()

◆ png_free_default()

void png_free_default ( png_const_structrp  png_ptr,
png_voidp  ptr 
)

Definition at line 246 of file pngmem.c.

References free().

Referenced by png_free().

◆ png_get_mem_ptr()

png_voidp png_get_mem_ptr ( png_const_structrp  png_ptr)

Definition at line 276 of file pngmem.c.

◆ png_malloc()

◆ png_malloc_array()

png_voidp png_malloc_array ( png_const_structrp  png_ptr,
int  nelements,
size_t  element_size 
)

Definition at line 123 of file pngmem.c.

References png_error(), and png_malloc_array_checked().

Referenced by png_set_sPLT().

◆ png_malloc_array_checked()

static png_voidp png_malloc_array_checked ( png_const_structrp  png_ptr,
int  nelements,
size_t  element_size 
)
static

Definition at line 109 of file pngmem.c.

References png_malloc_base(), and PNG_SIZE_MAX.

Referenced by png_malloc_array(), and png_realloc_array().

◆ png_malloc_base()

◆ png_malloc_default()

png_voidp png_malloc_default ( png_const_structrp  png_ptr,
png_alloc_size_t  size 
)

Definition at line 190 of file pngmem.c.

References png_error(), and png_malloc_base().

◆ png_malloc_warn()

◆ png_realloc_array()

png_voidp png_realloc_array ( png_const_structrp  png_ptr,
png_const_voidp  old_array,
int  old_elements,
int  add_elements,
size_t  element_size 
)

Definition at line 133 of file pngmem.c.

References png_error(), and png_malloc_array_checked().

Referenced by png_set_sPLT(), png_set_text_2(), and png_set_unknown_chunks().

◆ png_set_mem_fn()

void png_set_mem_fn ( png_structrp  png_ptr,
png_voidp  mem_ptr,
png_malloc_ptr  malloc_fn,
png_free_ptr  free_fn 
)

Definition at line 260 of file pngmem.c.

Referenced by png_create_png_struct().