1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-520 - initial changes for /dev/shm

This commit is contained in:
David Hill
2018-10-01 14:39:17 -05:00
parent 05bcd58e76
commit 8d3ce9757f
6 changed files with 68 additions and 12 deletions

View File

@ -1886,6 +1886,11 @@ static void statusControlThread()
//
//Allocate Shared Memory for storing Process Status Data
//
string shmLocation = "/dev/shm/";
if ( !rootUser)
shmLocation = startup::StartUp::installDir() + "/dev/shm/";
PROCSTATshmsize = MAX_PROCESS * sizeof(shmProcessStatus);
bool memInit = true;
#if 0
@ -1914,7 +1919,7 @@ static void statusControlThread()
bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write);
#ifdef __linux__
{
string pname = "/dev/shm/" + keyName;
string pname = shmLocation + keyName;
chmod(pname.c_str(), 0666);
}
#endif
@ -1992,7 +1997,7 @@ static void statusControlThread()
bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write);
#ifdef __linux__
{
string pname = "/dev/shm/" + keyName;
string pname = shmLocation + keyName;
chmod(pname.c_str(), 0666);
}
#endif
@ -2111,7 +2116,7 @@ static void statusControlThread()
bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write);
#ifdef __linux__
{
string pname = "/dev/shm/" + keyName;
string pname = shmLocation + keyName;
chmod(pname.c_str(), 0666);
}
#endif
@ -2209,7 +2214,7 @@ static void statusControlThread()
bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write);
#ifdef __linux__
{
string pname = "/dev/shm/" + keyName;
string pname = shmLocation + keyName;
chmod(pname.c_str(), 0666);
}
#endif
@ -2299,7 +2304,7 @@ static void statusControlThread()
bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write);
#ifdef __linux__
{
string pname = "/dev/shm/" + keyName;
string pname = shmLocation + keyName;
chmod(pname.c_str(), 0666);
}
#endif