Current File : //usr/man/man3mlib/mlib_malloc.3mlib
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved 
.TH mlib_malloc 3MLIB "12 Sep 2007" "SunOS 5.11" "mediaLib Library Functions"
.SH NAME
mlib_malloc \- allocate a block of bytes
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ]
#include <mlib.h>

\fBvoid *\fR\fBmlib_malloc\fR(\fBsize_t\fR \fIsize\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBmlib_malloc()\fR function allocates \fIsize\fR bytes on a 16-byte aligned boundary and returns a pointer to the allocated block.
.sp
.LP
This function is equivalent to \fBmemalign(16, size)\fR.
.SH PARAMETERS
.sp
.LP
The function takes the following arguments:
.sp
.ne 2
.mk
.na
\fB\fIsize\fR\fR
.ad
.RS 8n
.rt  
Size of the block in bytes.
.RE

.SH RETURN VALUES
.sp
.LP
The function returns a pointer to the allocated block if successful. Otherwise it returns a null pointer.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Interface StabilityCommitted
_
MT-LevelMT-Safe
.TE

.SH SEE ALSO
.sp
.LP
\fBmlib_free\fR(3MLIB), \fBmlib_realloc\fR(3MLIB), \fBmalloc\fR(3C), \fBattributes\fR(5)