mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 20:39:56 +08:00
Ensure that BO handle is closed only once
When one process had exported and then opened IPC handle of memory, then close function was called twice for the same BO handle. It caused debugBreak() and aborted an application. This change allows multiple separate BOs to share one handle. The last shared handle owner calls close() function. Related-To: NEO-7200 Signed-off-by: Wrobel, Patryk <patryk.wrobel@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
272427bb1c
commit
4c58eda90d
@@ -196,6 +196,8 @@ class MemoryManager {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual void registerIpcExportedAllocation(GraphicsAllocation *graphicsAllocation) {}
|
||||
|
||||
MOCKABLE_VIRTUAL void *alignedMallocWrapper(size_t bytes, size_t alignment);
|
||||
|
||||
MOCKABLE_VIRTUAL void alignedFreeWrapper(void *ptr);
|
||||
@@ -348,4 +350,4 @@ class MemoryManager {
|
||||
};
|
||||
|
||||
std::unique_ptr<DeferredDeleter> createDeferredDeleter();
|
||||
} // namespace NEO
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user