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