Converted previously hardcoded default sizes for shared memory pages to defines.
This commit is contained in:
parent
c99e0bc3ef
commit
43d35cf29b
8 changed files with 21 additions and 20 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <algorithm>
|
||||
#include <mist/timing.h>
|
||||
#include <mist/shared_memory.h>
|
||||
#include <mist/defines.h>
|
||||
#include "controller_storage.h"
|
||||
#include "controller_capabilities.h"
|
||||
|
||||
|
@ -80,7 +81,7 @@ namespace Controller {
|
|||
writeConf["streams"] = Storage["streams"];
|
||||
writeConf["capabilities"] = capabilities;
|
||||
|
||||
static IPC::sharedPage mistConfOut("!mistConfig", 4*1024*1024, true);
|
||||
static IPC::sharedPage mistConfOut("!mistConfig", DEFAULT_CONF_PAGE_SIZE, true);
|
||||
IPC::semaphore configLock("!mistConfLock", O_CREAT | O_RDWR, ACCESSPERMS, 1);
|
||||
//lock semaphore
|
||||
configLock.wait();
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace Controller {
|
|||
//push-style stream
|
||||
if (hasViewers(name)){
|
||||
data["meta"].null();
|
||||
IPC::sharedPage streamIndex(name,8 * 1024 * 1024,false,false);
|
||||
IPC::sharedPage streamIndex(name, DEFAULT_META_PAGE_SIZE, false, false);
|
||||
if (!streamIndex.mapped){
|
||||
return;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ namespace Controller {
|
|||
DEBUG_MSG(DLVL_INSANE, "Waiting for stream %s to open...", name.c_str());
|
||||
//wait for the stream
|
||||
{
|
||||
IPC::sharedPage streamIndex(name, 8 * 1024 * 1024);
|
||||
IPC::sharedPage streamIndex(name, DEFAULT_META_PAGE_SIZE);
|
||||
if (!streamIndex.mapped){
|
||||
DEBUG_MSG(DLVL_INSANE, "Stream %s opening failed! Cancelling and marking as corrupt.", name.c_str());
|
||||
data["meta"].null();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue