OSDN Git Service

Complete several pages in man2 and memory ja.po
[linuxjm/LDP_man-pages.git] / draft / man3 / malloc_trim.3
diff --git a/draft/man3/malloc_trim.3 b/draft/man3/malloc_trim.3
new file mode 100644 (file)
index 0000000..fee6b2b
--- /dev/null
@@ -0,0 +1,67 @@
+.\" t
+.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH MALLOC_TRIM 3 2014\-05\-28 Linux "Linux Programmer's Manual"
+.SH 名前
+malloc_trim \- ヒープの一番上から未使用メモリーを解放する
+.SH 書式
+\fB#include <malloc.h>\fP
+
+\fBint malloc_trim(size_t \fP\fIpad\fP\fB);\fP
+.SH 説明
+\fBmalloc_trim\fP() 関数は (適切な引き数で \fBsbrk\fP(2) を呼び出して) ヒープの一番上の未使用メモリーの解放を試みる。
+
+\fIpad\fP 引き数は、 ヒープの一番上から切り詰める際に残す未使用領域の量を指定する。 この引き数が 0 の場合、
+ヒープの一番上の最小量のメモリーだけを維持できる (つまり 1 ページかそれ未満)。 0 以外の引き数を指定すると、
+ヒープの一番上にある程度の量の未使用領域を残し、 将来の割り当てを \fBsbrk\fP(2) でヒープを拡張せずに行えるようにできる。
+.SH 返り値
+\fBmalloc_trim\fP() 関数はメモリーが実際に解放されシステムに戻された場合に 1 を返し、 どのメモリーも解放できなかった場合は 0
+を返す。
+.SH エラー
+.\" .SH VERSIONS
+.\" Available already in glibc 2.0, possibly earlier
+エラーは定義されていない。
+.SH 準拠
+この関数は GNU による拡張である。
+.SH 注意
+この関数は、 特定の状況では \fBfree\fP(3) により自動的に呼び出される。 \fBmallopt\fP(3) の \fBM_TOP_PAD\fP と
+\fBM_TRIM_THRESHOLD\fP の議論を参照。
+
+この関数は、 ヒープの一番上以外の場所にある未使用メモリーを解放することはできない。
+
+.\" malloc/malloc.c::mTRIm():
+.\"     return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
+この関数はメイン領域のメモリーだけを解放する。
+.SH 関連項目
+\fBsbrk\fP(2), \fBmalloc\fP(3), \fBmallopt\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。