Functions and classes for managing memory.
Memory management in seastar consists of the following:
◆ append()
void seastar::deleter::append |
( |
deleter |
d | ) |
|
|
inline |
Appends another deleter to this deleter. When this deleter is destroyed, both encapsulated actions will be carried out.
◆ make_deleter() [1/2]
template<typename Object >
Makes a deleter that encapsulates the action of destroying an object, as well as running another deleter. The input object is moved to the deleter, and destroyed when the deleter is destroyed.
- Parameters
-
next | deleter that will become part of the new deleter's encapsulated action |
o | object whose destructor becomes part of the new deleter's encapsulated action |
◆ make_deleter() [2/2]
template<typename Object >
Makes a deleter that encapsulates the action of destroying an object. The input object is moved to the deleter, and destroyed when the deleter is destroyed.
- Parameters
-
o | object whose destructor becomes the new deleter's encapsulated action |
◆ make_free_deleter() [1/2]
Makes a deleter that calls std::free()
when it is destroyed, as well as invoking the encapsulated action of another deleter.
- Parameters
-
next | deleter to invoke. |
obj | object to free. |
◆ make_free_deleter() [2/2]
deleter make_free_deleter |
( |
void * |
obj | ) |
|
|
related |
Makes a deleter that calls std::free()
when it is destroyed.
- Parameters
-
◆ make_object_deleter() [1/2]
◆ make_object_deleter() [2/2]
template<typename T >
deleter make_object_deleter |
( |
T && |
obj | ) |
|
|
related |
◆ share()
deleter seastar::deleter::share |
( |
| ) |
|
|
inline |
Performs a sharing operation. The encapsulated action will only be carried out after both the original deleter and the returned deleter are both destroyed.
- Returns
- a deleter with the same encapsulated action as this one.