OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / alloca.3
index 18843ed..3b7c384 100644 (file)
 .\"     Various rewrites and additions (notes on longjmp() and SIGSEGV).
 .\"     Weaken warning against use of alloca() (as per Debian bug 461100).
 .\"
-.\" Japanese Version Copyright (c) 1996 Kentaro OGAWA
-.\"         all rights reserved.
-.\" Translated Sat, 13 Jul 1996 22:44:04 +0900
-.\"         by Kentaro OGAWA <k_ogawa@oyna.cc.muroran-it.ac.jp>
-.\" Updated & Modified Tue Oct 16 01:01:48 JST 2001
-.\"         by Yuichi SATO <ysato@mail.sbvl.muroran-it.ac.jp>
-.\" Updated & Modified Sat Aug 31 04:42:49 JST 2002 by Yuichi SATO
+.\"*******************************************************************
 .\"
-.TH ALLOCA 3 2008-01-24 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH ALLOCA 3 2008\-01\-24 GNU "Linux Programmer's Manual"
 .SH 名前
-.\"O alloca \- allocate memory that is automatically freed
 alloca \- 自動的に解放されるメモリを割り当てる
-.\"O .SH SYNOPSIS
 .SH 書式
-.B #include <alloca.h>
+\fB#include <alloca.h>\fP
 .sp
-.BI "void *alloca(size_t " size );
-.\"O .SH DESCRIPTION
+\fBvoid *alloca(size_t \fP\fIsize\fP\fB);\fP
 .SH 説明
-.\"O The
-.\"O .BR alloca ()
-.\"O function allocates
-.\"O .I size
-.\"O bytes of space in the stack frame of the caller.
-.\"O This temporary space is
-.\"O automatically freed when the function that called
-.\"O .BR alloca ()
-.\"O returns to its caller.
-.BR alloca ()
-関数は、
-.I size
-バイトの領域を呼出元のスタック・フレームに割り付ける。
-この一時的な領域は、
-.BR alloca ()
+\fBalloca\fP()  関数は、 \fIsize\fP バイトの領域を呼出元のスタック・フレームに割り付ける。 この一時的な領域は、 \fBalloca\fP()
 を呼び出した関数が呼出元に返るときに自動的に解放される。
-.\"O .SH "RETURN VALUE"
 .SH 返り値
-.\"O The
-.\"O .BR alloca ()
-.\"O function returns a pointer to the beginning of the allocated space.
-.\"O If the allocation causes stack overflow, program behavior is undefined.
-.BR alloca ()
-関数は、割り付けた領域の始まりを指すポインタを返す。
-割り付けによってスタックオーバーフローが起った場合の
+\fBalloca\fP()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けによってスタックオーバーフローが起った場合の
 プログラムの動作は定義されていない。
-.\"O .SH "CONFORMING TO"
 .SH 準拠
-.\"O This function is not in POSIX.1-2001.
-この関数は POSIX.1-2001 にはない。
+この関数は POSIX.1\-2001 にはない。
 
-.\"O There is evidence that the
-.\"O .BR alloca ()
-.\"O function appeared in 32V, PWB, PWB.2, 3BSD, and 4BSD.
-.\"O There is a man page for it in 4.3BSD.
-.\"O Linux uses the GNU version.
-.\"O This function is not in POSIX.1-2001.
-32V, PWB, PWB.2, 3BSD, 4BSD に
-.BR alloca ()
-関数が登場した証拠がある。
-4.3BSD には、マニュアルページがある。
-Linux は、GNU 版を使っている。
-この関数は POSIX.1-2001 にはない。
-.\"O .SH NOTES
+32V, PWB, PWB.2, 3BSD, 4BSD に \fBalloca\fP()  関数が登場した証拠がある。 4.3BSD
+には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数は POSIX.1\-2001 にはない。
 .SH 注意
-.\"O The
-.\"O .BR alloca ()
-.\"O function is machine- and compiler-dependent.
-.BR alloca ()
-関数は、機種とコンパイラに依存する。
-.\"O For certain applications,
-.\"O its use can improve efficiency compared to the use of
-.\"O .BR malloc (3)
-.\"O plus
-.\"O .BR free (3).
-.\"O In certain cases,
-.\"O it can also simplify memory deallocation in applications that use
-.\"O .BR longjmp (3)
-.\"O or
-.\"O .BR siglongjmp (3).
-.\"O Otherwise, its use is discouraged.
-特定のアプリケーションでは、この関数を使うと
-.BR malloc (3)
-と
-.BR free (3)
-を組み合わせて使った場合に比べて効率を改善することができる。
-特定の場合では、この関数を使うことで、
-.BR longjmp (3)
-や
-.BR siglongjmp (3)
-を使うアプリケーションでのメモリの開放を簡単にすることができる。
+\fBalloca\fP()  関数は、機種とコンパイラに依存する。 特定のアプリケーションでは、この関数を使うと \fBmalloc\fP(3)  と
+\fBfree\fP(3)  を組み合わせて使った場合に比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 \fBlongjmp\fP(3)
+や \fBsiglongjmp\fP(3)  を使うアプリケーションでのメモリの開放を簡単にすることができる。
 それ以外の場合では、この関数の使用は推奨されない。
 
-.\"O Because the space allocated by
-.\"O .BR alloca ()
-.\"O is allocated within the stack frame,
-.\"O that space is automatically freed if the function return
-.\"O is jumped over by a call to
-.\"O .BR longjmp (3)
-.\"O or
-.\"O .BR siglongjmp (3).
-.BR alloca ()
-により割り当てられる空間はスタックフレームから割り当てらるので、
-関数の戻り先が
-.BR longjmp (3)
-や
-.BR siglongjmp (3)
-の呼び出しによりジャンプした場合には、
-割り当てられた空間は自動的に解放される。
+\fBalloca\fP()  により割り当てられる空間はスタックフレームから割り当てらるので、 関数の戻り先が \fBlongjmp\fP(3)  や
+\fBsiglongjmp\fP(3)  の呼び出しによりジャンプした場合には、 割り当てられた空間は自動的に解放される。
 
-.\"O Do not attempt to
-.\"O .BR free (3)
-.\"O space allocated by
-.\"O .BR alloca ()!
-.BR alloca ()
-で割り当てられた空間を
-.BR free (3)
-しようとすることのないように!
-.\"O .SS Notes on the GNU Version
-.SH 注意
-.SS GNU 版についての注意
-.\"O Normally,
-.\"O .BR gcc (1)
-.\"O translates calls to
-.\"O .BR alloca ()
-.\"O with inlined code.
-.\"O This is not done when either the
-.\"O .IR "\-ansi" ,
-.\"O .IR "\-std=c89" ,
-.\"O .IR "\-std=c99" ,
-.\"O or the
-.\"O .IR "\-fno\-builtin"
-.\"O option is given
-.\"O (and the header
-.\"O .I <alloca.h>
-.\"O is not included).
-.\"O But beware!
-.\"O By default the glibc version of
-.\"O .I <stdlib.h>
-.\"O includes
-.\"O .I <alloca.h>
-.\"O and that contains the line:
-.\"O .nf
-.\"O 
-.\"O     #define alloca(size)   __builtin_alloca (size)
-.\"O 
-.\"O .fi
-.\"O with messy consequences if one has a private version of this function.
-通常
-.BR gcc (1)
-は
-.BR alloca ()
-の呼び出しをインラインコードに変換する。
-.IR "\-ansi" ,
-.IR "\-std=c89" ,
-.IR "\-std=c99" ,
-.IR "\-fno\-builtin"
-のいずれかのオプションが指定された場合、この変換は行われない
-(また
-.I <alloca.h>
-のインクルードも行われない)。
-だだし、デフォルトでは glibc 版の
-.I <stdlib.h>
-は
-.I <alloca.h>
+\fBalloca\fP()  で割り当てられた空間を \fBfree\fP(3)  しようとすることのないように!
+.SS "GNU 版についての注意"
+通常 \fBgcc\fP(1)  は \fBalloca\fP()  の呼び出しをインラインコードに変換する。 \fI\-ansi\fP, \fI\-std=c89\fP,
+\fI\-std=c99\fP, \fI\-fno\-builtin\fP のいずれかのオプションが指定された場合、この変換は行われない (また
+\fI<alloca.h>\fP のインクルードも行われない)。 だだし、デフォルトでは glibc 版の
+\fI<stdlib.h>\fP は \fI<alloca.h>\fP
 をインクルードしており、これには以下の行が含まれているので注意すること。
 .nf
 
@@ -211,48 +84,15 @@ Linux は、GNU 版を使っている。
 .fi
 独自版の __builtin_alloca (size) 関数があると厄介な結果になる。
 .LP
-.\"O The fact that the code is inlined means that it is impossible
-.\"O to take the address of this function, or to change its behavior
-.\"O by linking with a different library.
-このコードはインライン化されているので、
-この関数のアドレスを取得したり、
-他のライブラリをリンクして動作を変更することはできない。
+このコードはインライン化されているので、 この関数のアドレスを取得したり、 他のライブラリをリンクして動作を変更することはできない。
 .LP
-.\"O The inlined code often consists of a single instruction adjusting
-.\"O the stack pointer, and does not check for stack overflow.
-.\"O Thus, there is no NULL error return.
-通常このインラインコードはスタックポインタを移動する
-1 つの命令 (instruction) から構成されており、
-スタックオーバーフローをチェックしない。
-よって NULL エラーが返されることはない。
-.\"O .SH BUGS
+通常このインラインコードはスタックポインタを移動する 1 つの命令 (instruction) から構成されており、
+スタックオーバーフローをチェックしない。 よって NULL エラーが返されることはない。
 .SH バグ
-.\"O There is no error indication if the stack frame cannot be extended.
-.\"O (However, after a failed allocation, the program is likely to receive a
-.\"O .B SIGSEGV
-.\"O signal if it attempts to access the unallocated space.)
-スタックフレームが拡張できなかった場合、エラー通知は行われない。
-(しかしながら、割り当てに失敗した後で、プログラムが割り当てられなかった
-空間にアクセスしようとした場合に
-.B SIGSEGV
-シグナルを受信することだろう。)
+スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしながら、割り当てに失敗した後で、プログラムが割り当てられなかった
+空間にアクセスしようとした場合に \fBSIGSEGV\fP シグナルを受信することだろう。)
 
-.\"O On many systems
-.\"O .BR alloca ()
-.\"O cannot be used inside the list of arguments of a function call, because
-.\"O the stack space reserved by
-.\"O .BR alloca ()
-.\"O would appear on the stack in the middle of the space for the
-.\"O function arguments.
-多くのシステムにおいて、関数コールの引き数のリスト内では
-.BR alloca ()
-が使えない。
-これは、
-.BR alloca ()
-によって予約されるスタック領域が、
-関数引き数に使われるスタック領域の中に現れてしまうためである。
-.\"O .SH "SEE ALSO"
+多くのシステムにおいて、関数コールの引き数のリスト内では \fBalloca\fP()  が使えない。 これは、 \fBalloca\fP()
+によって予約されるスタック領域が、 関数引き数に使われるスタック領域の中に現れてしまうためである。
 .SH 関連項目
-.BR brk (2),
-.BR longjmp (3),
-.BR malloc (3)
+\fBbrk\fP(2), \fBlongjmp\fP(3), \fBmalloc\fP(3)