Merge branch 'development' into LTS_development
This commit is contained in:
commit
5c074757f1
1 changed files with 11 additions and 7 deletions
|
@ -449,7 +449,7 @@ namespace IPC {
|
|||
handle = shm_open(name.c_str(), (master ? O_CREAT | O_EXCL : 0) | O_RDWR, ACCESSPERMS);
|
||||
if (handle == -1) {
|
||||
if (master) {
|
||||
ERROR_MSG("Overwriting old page for %s", name.c_str());
|
||||
if (len > 1){ERROR_MSG("Overwriting old page for %s", name.c_str());}
|
||||
handle = shm_open(name.c_str(), O_CREAT | O_RDWR, ACCESSPERMS);
|
||||
} else {
|
||||
int i = 0;
|
||||
|
@ -1007,10 +1007,12 @@ namespace IPC {
|
|||
amount = lastFilled+1;
|
||||
VERYHIGH_MSG("Shared memory %s is now at count %u", baseName.c_str(), amount);
|
||||
}
|
||||
if (id >= amount + 100) {
|
||||
//stop, we're guaranteed no more pages are full at this point
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (memcmp(empty, it->mapped + offset, payLen)) {
|
||||
++userCount;
|
||||
|
@ -1029,6 +1031,7 @@ namespace IPC {
|
|||
amount = lastFilled+1;
|
||||
VERYHIGH_MSG("Shared memory %s is now at count %u", baseName.c_str(), amount);
|
||||
}
|
||||
if (id >= amount + 100) {
|
||||
//stop, we're guaranteed no more pages are full at this point
|
||||
if (empty) {
|
||||
free(empty);
|
||||
|
@ -1037,6 +1040,7 @@ namespace IPC {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
offset += payLen + (hasCounter ? 1 : 0);
|
||||
id ++;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue