Dev/shm free obsolete (#1274)
Some checks failed
Build on RHEL9 / build (push) Failing after 3m24s
Build on RHEL8 / build (push) Failing after 5m7s

* freeing obsolete shm withoua a 'isValid' should access raw pointers. Need to move this all into the shm class

* fixed obsolete shm free issue

* minor

* ensuring the test works platform independent for size of int
This commit is contained in:
2025-08-21 14:32:15 +02:00
committed by GitHub
parent 72056ff813
commit 15cbaa509e
7 changed files with 139 additions and 33 deletions

View File

@@ -30,7 +30,6 @@ void freeSharedMemory(const int detectorIndex, const int moduleIndex) {
SharedMemory<sharedModule> moduleShm(detectorIndex, moduleIndex);
if (moduleShm.exists()) {
moduleShm.openSharedMemory(false);
moduleShm()->isValid = false;
moduleShm.removeSharedMemory();
}
return;
@@ -43,7 +42,6 @@ void freeSharedMemory(const int detectorIndex, const int moduleIndex) {
if (detectorShm.exists()) {
detectorShm.openSharedMemory(false);
numDetectors = detectorShm()->totalNumberOfModules;
detectorShm()->isValid = false;
detectorShm.removeSharedMemory();
}
@@ -51,16 +49,14 @@ void freeSharedMemory(const int detectorIndex, const int moduleIndex) {
SharedMemory<sharedModule> moduleShm(detectorIndex, i);
if (moduleShm.exists()) {
moduleShm.openSharedMemory(false);
moduleShm()->isValid = false;
moduleShm.removeSharedMemory();
}
moduleShm.removeSharedMemory();
}
// Ctb configuration
SharedMemory<CtbConfig> ctbShm(detectorIndex, -1, CtbConfig::shm_tag());
if (ctbShm.exists()) {
ctbShm.openSharedMemory(false);
ctbShm()->isValid = false;
ctbShm.removeSharedMemory();
}
}