名前空間
変種
操作

std::scoped_allocator_adaptor::allocate

提供: cppreference.com

 
 
動的メモリ管理
未初期化記憶域
(C++17)
ガベージコレクションサポート
その他
(C++20)
(C++11)
(C++11)
C のライブラリ
低水準のメモリ管理
 
std::scoped_allocator_adaptor
メンバ関数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
scoped_allocator_adaptor::allocate
非メンバ関数
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
ヘッダ <scoped_allocator> で定義
pointer allocate( size_type n );
(1) (C++11およびそれ以降)
pointer allocate( size_type n, const_void_pointer hint );
(2) (C++11およびそれ以降)
1)
std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n)を呼び出すことによって、初期化されていないストレージを割り当てるために外側のアロケータを使用しています
Original:
Uses the outer allocator to allocate uninitialized storage, by calling std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n, hint)を呼び出すことによって、提供されているメモリの局所性のヒントを使用して初期化されていないストレージを割り当てるために外側のアロケータを使用しています
Original:
Uses the outer allocator to allocate uninitialized storage with the memory locality hint provided, by calling std::allocator_traits<OuterAlloc>::allocate(outer_allocator(), n, hint)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] パラメータ

n -
にストレージを割り当てたオブジェクトの数
Original:
the number of objects to allocate storage for
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
hint -
近くのメモリ位置へのポインタ
Original:
pointer to a nearby memory location
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 値を返します

割り当てられたストレージへのポインタ
Original:
The pointer to the allocated storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 参照

未初期化記憶域を確保します
(std::allocatorのパブリックメンバ関数) [edit]
[static]
アロケータを使用して初期化されていないストレージが割り当てられます
Original:
allocates uninitialized storage using the allocator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(std::allocator_traitsのパブリック静的メンバ関数) [edit]