Home
last modified time | relevance | path

Searched refs:shm_id_ (Results 1 – 6 of 6) sorted by relevance

/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/cache/
Dcache_ipc.h124 SharedMemory() : shm_id_(-1), shm_key_(-1), shmat_addr_(nullptr) {} in SharedMemory()
125 …explicit SharedMemory(shm_key_t public_key) : shm_id_(-1), shm_key_(public_key), shmat_addr_(nullp… in SharedMemory()
129 : BaseIPC(rhs), shm_id_(rhs.shm_id_), shm_key_(rhs.shm_key_), shmat_addr_(rhs.shmat_addr_) {} in SharedMemory()
132 shm_id_ = rhs.shm_id_;
141 shm_id_ = rhs.shm_id_; in SharedMemory()
144 rhs.shm_id_ = -1; in SharedMemory()
150 shm_id_ = rhs.shm_id_;
153 rhs.shm_id_ = -1;
188 shm_id_t GetSharedMemoryId() const { return shm_id_; } in GetSharedMemoryId()
195 shm_id_t shm_id_;
Dcache_ipc.cc90 if (remove_ipc_on_exit_ && shm_id_ != -1) { in ~SharedMemory()
97 shm_id_ = -1; in ~SharedMemory()
103 shm_id_ = shmget(shm_key_, sz, IPC_CREAT | IPC_EXCL | access_mode); in Create()
104 if (shm_id_ == -1) { in Create()
107 shmat_addr_ = shmat(shm_id_, nullptr, 0); in Create()
116 shm_id_ = shmget(shm_key_, 0, 0); in Attach()
117 if (shm_id_ == -1) { in Attach()
120 shmat_addr_ = shmat(shm_id_, nullptr, 0); in Attach()
140 auto err = shmctl(shm_id_, IPC_RMID, nullptr); in Destroy()
142 std::string errMsg = "Unable to remove shared memory with id " + std::to_string(shm_id_); in Destroy()
[all …]
/third_party/mindspore/mindspore/ccsrc/cxx_api/model/model_converter_utils/
Dshared_memory.cc25 shm_id_ = shmget(IPC_PRIVATE, memory_size, IPC_CREAT | IPC_EXCL | access_mode); in Create()
26 if (shm_id_ == -1) { in Create()
30 MS_LOG_INFO << "shmget success, shm id " << shm_id_; in Create()
35 void *shmat_addr = shmat(shm_id_, nullptr, 0); in Attach()
57 auto err = shmctl(shm_id_, IPC_RMID, nullptr); in Destroy()
59 std::string errMsg = "Unable to remove shared memory with id " + std::to_string(shm_id_); in Destroy()
Dshared_memory.h34 int shm_id_ = -1; variable
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/akg/
Dakg_kernel_build.cc149 shm_id_ = shmget(key_id, mem_size, IPC_CREAT | IPC_EXCL | 0600); in CreateSharedMem()
150 if (shm_id_ == -1) { in CreateSharedMem()
152 shm_id_ = shmget(key_id, mem_size, 0); in CreateSharedMem()
155 if (shm_id_ == -1) { in CreateSharedMem()
163 auto local_addr = shmat(shm_id_, nullptr, 0); in CreateSharedMem()
213 auto ret = shmctl(shm_id_, IPC_STAT, &buf); in Release()
235 ret = shmctl(shm_id_, IPC_RMID, nullptr); in Release()
Dakg_kernel_build.h132 int32_t shm_id_{-1};