MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / sharedMemoryClose

Function sharedMemoryClose

Common/helper_multiprocess.cpp:103–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void sharedMemoryClose(sharedMemoryInfo *info) {
104#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
105 if (info->addr) {
106 UnmapViewOfFile(info->addr);
107 }
108 if (info->shmHandle) {
109 CloseHandle(info->shmHandle);
110 }
111#else
112 if (info->addr) {
113 munmap(info->addr, info->size);
114 }
115 if (info->shmFd) {
116 close(info->shmFd);
117 }
118#endif
119}
120
121int spawnProcess(Process *process, const char *app, char *const *args) {
122#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)

Callers 1

parentProcessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected