hipmempooltrimto Interface Reference#
hipfort::hipmempooltrimto Interface Reference
Releases freed memory back to the OS. More...
Public Member Functions | |
| integer(kind(hipsuccess)) function | hipmempooltrimto_ (mem_pool, min_bytes_to_hold) |
Detailed Description
Releases freed memory back to the OS.
Releases memory back to the OS until the pool contains fewer than min_bytes_to_keep reserved bytes, or there is no more memory that the allocator can safely release. The allocator cannot release OS allocations that back outstanding asynchronous allocations. The OS allocations may happen at different granularity from the user allocations.
- Note
- Allocations that have not been freed count as outstanding.
- Allocations that have been asynchronously freed but whose completion has not been observed on the host (eg. by a synchronize) can count as outstanding.
- Parameters
-
[in] mem_pool - The memory pool to trim allocations [in] min_bytes_to_hold - If the pool has less than min_bytes_to_hold reserved, then the TrimTo operation is a no-op. Otherwise the memory pool will contain at least min_bytes_to_hold bytes reserved after the operation.
- Returns
hipSuccess,hipErrorInvalidValue
- See also
- hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess
- Warning
- This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Note
- This API is implemented on Linux and is under development on Microsoft Windows.
Member Function/Subroutine Documentation
◆ hipmempooltrimto_()
| integer(kind(hipsuccess)) function hipfort::hipmempooltrimto::hipmempooltrimto_ | ( | type(c_ptr), value | mem_pool, |
| integer(c_size_t), value | min_bytes_to_hold | ||
| ) |
The documentation for this interface was generated from the following file: