Free#

Fully qualified name: cupva::mem::Free

Defined in src/host/cpp_api/include/cupva_host.hpp

void cupva::mem::Free(void *const devicePtr)#

Free the allocated memory.

This API should be used only at deinit time in safety critical systems.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: No

    • De-Init: Yes

Parameters:

devicePtr[in] The device pointer pointing to the allocated memory.

Throws:
  • cupva::Exception(InvalidArgument) – The device pointer is invalid.

  • cupva::Exception(DriverAPIError) – Deallocation failed due to driver API error.

  • cupva::Exception(NotAllowedInOperationalState) – if called when NVIDIA DRIVE OS VM state is “Operational”