.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "NTFS_RL_REALLOC" "9" "09 October 2005" "" ""
.SH NAME
ntfs_rl_realloc \- Reallocate memory for runlists
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
runlist_element * ntfs_rl_realloc (runlist_element * \fIrl\fB, int \fIold_size\fB, int \fInew_size\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIrl\fB\fR
original runlist
.TP
\fB\fIold_size\fB\fR
number of runlist elements in the original runlist \fIrl\fR
.TP
\fB\fInew_size\fB\fR
number of runlist elements we need space for
.SH "DESCRIPTION"
.PP
As the runlists grow, more memory will be required. To prevent the
kernel having to allocate and reallocate large numbers of small bits of
memory, this function returns an entire page of memory.
.PP
It is up to the caller to serialize access to the runlist \fIrl\fR\&.
.PP
N.B. If the new allocation doesn't require a different number of pages in
memory, the function will return the original pointer.
.PP
On success, return a pointer to the newly allocated, or recycled, memory.
On error, return -errno. The following error codes are defined:
-ENOMEM - Not enough memory to allocate runlist array.
-EINVAL - Invalid parameters were passed in.