From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/pr_new/index.html | 441 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 441 insertions(+) create mode 100644 files/ja/pr_new/index.html (limited to 'files/ja/pr_new') diff --git a/files/ja/pr_new/index.html b/files/ja/pr_new/index.html new file mode 100644 index 0000000000..30ed6ddf0d --- /dev/null +++ b/files/ja/pr_new/index.html @@ -0,0 +1,441 @@ +--- +title: PR_NEW +slug: PR_NEW +tags: + - NSPR_API + - NSPR_API_Reference +translation_of: Mozilla/Projects/NSPR/Reference/PR_NEW +--- +

+

ヒープ領域に指定されたサイズのメモリを確保します。 +

+

+

構文

+
#include <prmem.h>
+
+_type * PR_NEW(_struct);
+
+


+ +

+

パラメータ

+
_struct +
型の名前 +
+

+

+

戻り値

+

_struct 型を含むことができるサイズのバッファへのポインタ、もしくはメモリ確保に失敗した場合は NULL を返します。PR_GetError() を呼ぶことで、libc の関数 malloc() が戻したエラーを取得できます。 +

+

+

解説

+

このマクロは、sizeof(_struct) の大きさを持つメモリ領域を確保し、そのメモリ領域へのポインタを返します。 +

-- cgit v1.2.3-54-g00ecf