File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,15 @@ namespace std {
1616
1717この関数で返されるポインタは、割当領域の先頭のポインタである。
1818
19- 領域が割り当てられない場合は 、[`nullptr`](/lang/cpp11/nullptr.md)を返す。
19+ 領域の確保に失敗した場合は 、[`nullptr`](/lang/cpp11/nullptr.md)を返す。
2020
21- 割り当てられたオブジェクトの寿命は、このメモリが割り当てられてられた時から 、[`free`](free.md.nolink)などで解放されるまでである。
21+ 割り当てられたオブジェクトの寿命は、このメモリが割り当てられた時から 、[`free`](free.md.nolink)などで解放されるまでである。
2222
23- この関数は、静的ストレージにはアクセスしない 、スレッドセーフである。
23+ この関数は、静的ストレージにはアクセスせず 、スレッドセーフである。
2424
2525## 備考
2626
27- - `calloc`、 `malloc`および `realloc`関数による連続的なメモリ確保によるメモリの割当の順序、連続性は不定である 。
27+ - `calloc`・ `malloc`・ `realloc` によって確保されたメモリの連続性や順序は保証されない 。
2828
2929- メモリリークを避けるため、この関数で確保したメモリは、`free`などを使い、メモリ解放するべきである。
3030
@@ -36,7 +36,7 @@ namespace std {
3636
3737int main(void)
3838{
39- int* p1 = calloc(4, sizeof(int)); // 4個のint配列のポインタを確保、0二初期化
39+ int* p1 = calloc(4, sizeof(int)); // 4個のint配列のポインタを確保、0に初期化
4040 int* p2 = calloc(1, sizeof(int[4])); // 上と同じ
4141 int* p3 = calloc(4, sizeof *p3); // 上と同じ
4242
You can’t perform that action at this time.
0 commit comments