Blame man/TIFFmemory.3tiff

Packit 85355f
.\" $Id: TIFFmemory.3tiff,v 1.3 2016-09-25 20:05:51 bfriesen Exp $
Packit 85355f
.\"
Packit 85355f
.\" Copyright (c) 1995 Sam Leffler
Packit 85355f
.\" Copyright (c) 1995 Silicon Graphics, Inc.
Packit 85355f
.\"
Packit 85355f
.\" Permission to use, copy, modify, distribute, and sell this software and 
Packit 85355f
.\" its documentation for any purpose is hereby granted without fee, provided
Packit 85355f
.\" that (i) the above copyright notices and this permission notice appear in
Packit 85355f
.\" all copies of the software and related documentation, and (ii) the names of
Packit 85355f
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
Packit 85355f
.\" publicity relating to the software without the specific, prior written
Packit 85355f
.\" permission of Sam Leffler and Silicon Graphics.
Packit 85355f
.\" 
Packit 85355f
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
Packit 85355f
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
Packit 85355f
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
Packit 85355f
.\" 
Packit 85355f
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
Packit 85355f
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
Packit 85355f
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
Packit 85355f
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
Packit 85355f
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
Packit 85355f
.\" OF THIS SOFTWARE.
Packit 85355f
.\"
Packit 85355f
.if n .po 0
Packit 85355f
.TH MEMORY 3TIFF "October 15, 1995" "libtiff"
Packit 85355f
.SH NAME
Packit 85355f
_TIFFmalloc, \c
Packit 85355f
_TIFFrealloc, \c
Packit 85355f
_TIFFfree, \c
Packit 85355f
_TIFFmemset, \c
Packit 85355f
_TIFFmemcpy, \c
Packit 85355f
_TIFFmemcmp, \c
Packit 85355f
\- memory management-related functions for use with
Packit 85355f
.SM TIFF
Packit 85355f
files
Packit 85355f
.SH SYNOPSIS
Packit 85355f
.B "#include <tiffio.h>"
Packit 85355f
.sp
Packit 85355f
.BI "tdata_t _TIFFmalloc(tsize_t " size ");"
Packit 85355f
.br
Packit 85355f
.BI "tdata_t _TIFFrealloc(tdata_t " buffer ", tsize_t " size ");"
Packit 85355f
.br
Packit 85355f
.BI "void _TIFFfree(tdata_t " buffer ");"
Packit 85355f
.br
Packit 85355f
.BI "void _TIFFmemset(tdata_t " s ", int " c ", tsize_t " n ");"
Packit 85355f
.br
Packit 85355f
.BI "void _TIFFmemcpy(tdata_t " dest ", const tdata_t " src ", tsize_t " n ");"
Packit 85355f
.br
Packit 85355f
.BI "int _TIFFmemcmp(const tdata_t " s1 ", const tdata_t "s2 ", tsize_t " n ");"
Packit 85355f
.SH DESCRIPTION
Packit 85355f
These routines are provided for writing portable software that uses 
Packit 85355f
.IR libtiff ;
Packit 85355f
they hide any memory-management related issues, such as dealing with segmented
Packit 85355f
architectures found on 16-bit machines.
Packit 85355f
.PP
Packit 85355f
.I _TIFFmalloc
Packit 85355f
and
Packit 85355f
.I _TIFFrealloc
Packit 85355f
are used to dynamically allocate and reallocate memory used by 
Packit 85355f
.IR libtiff ;
Packit 85355f
such as memory passed into the I/O routines. Memory allocated through these
Packit 85355f
interfaces is released back to the system using the
Packit 85355f
.I _TIFFfree
Packit 85355f
routine.
Packit 85355f
.PP
Packit 85355f
Memory allocated through one of the above interfaces can be set to a known
Packit 85355f
value using
Packit 85355f
.IR _TIFFmemset ,
Packit 85355f
copied to another memory location using
Packit 85355f
.IR _TIFFmemcpy ,
Packit 85355f
or compared for equality using 
Packit 85355f
.IR _TIFFmemcmp .
Packit 85355f
These routines conform to the equivalent
Packit 85355f
.SM ANSI
Packit 85355f
C routines: 
Packit 85355f
.IR memset ,
Packit 85355f
.IR memcpy ,
Packit 85355f
and
Packit 85355f
.IR memcmp ,
Packit 85355f
repsectively.
Packit 85355f
.SH DIAGNOSTICS
Packit 85355f
None.
Packit 85355f
.SH "SEE ALSO"
Packit 85355f
.BR malloc (3),
Packit 85355f
.BR memory (3),
Packit 85355f
.BR libtiff (3TIFF)
Packit 85355f
.PP
Packit 85355f
Libtiff library home page:
Packit 85355f
.BR http://www.simplesystems.org/libtiff/