-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Off-heap memory allocated by DeviceArray objects are freed in the finalizer, i.e., cudaFree(...) is called in the objects finalize() method.
As finalize() is deprecated since Java 9, resource deallocation should be implemented using finalization queues.
The finalizer queue should be checked at certain points throughout the lifetime of the language context and memory buffers on the queue freed up with cudaFree(). The cleanup must be performed by the proper thread. Given grCUDA is registered as single-threaded language in Truffle, the deallocation must be performed by the main thread.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request