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