#include <qwssharedmemory_p.h>
Definition at line 62 of file qwssharedmemory_p.h.
◆ QWSSharedMemory()
QWSSharedMemory::QWSSharedMemory |
( |
| ) |
|
◆ ~QWSSharedMemory()
QWSSharedMemory::~QWSSharedMemory |
( |
| ) |
|
◆ address()
void* QWSSharedMemory::address |
( |
| ) |
const |
|
inline |
◆ attach()
bool QWSSharedMemory::attach |
( |
int |
id | ) |
|
Definition at line 146 of file qwssharedmemory.cpp.
Referenced by QWSSharedMemSurface::setMemory().
165 if (QT_FSTAT(hand, &st) != -1) {
168 shmBase = mmap(0,
shmSize, PROT_READ | PROT_WRITE, MAP_SHARED, hand, 0);
174 perror(
"QWSSharedMemory::attach():");
#define EINTR_LOOP(var, cmd)
The QByteArray class provides an array of bytes.
Q_CORE_EXPORT void qWarning(const char *,...)
const char * constData() const
Returns a pointer to the data stored in the byte array.
#define st(var, type, card)
◆ create()
bool QWSSharedMemory::create |
( |
int |
size | ) |
|
Definition at line 88 of file qwssharedmemory.cpp.
Referenced by QWSSharedMemSurface::setGeometry().
94 shmId = shmget(IPC_PRIVATE,
size, IPC_CREAT | 0600);
97 shmId = (getpid() << 16) + (localUniqueId.fetchAndAddRelaxed(1) %
ushort(-1));
112 perror(
"QWSSharedMemory::create():");
113 qWarning(
"Error allocating shared memory of size %d",
size);
124 shmctl(
shmId, IPC_RMID, 0);
128 if (QT_FSTAT(hand, &st) != -1) {
131 shmBase = mmap(0,
shmSize, PROT_READ | PROT_WRITE, MAP_SHARED, hand, 0);
136 perror(
"QWSSharedMemory::create():");
#define EINTR_LOOP(var, cmd)
The QByteArray class provides an array of bytes.
Q_CORE_EXPORT void qWarning(const char *,...)
const char * constData() const
Returns a pointer to the data stored in the byte array.
#define st(var, type, card)
◆ detach()
void QWSSharedMemory::detach |
( |
| ) |
|
◆ id()
int QWSSharedMemory::id |
( |
| ) |
const |
|
inline |
◆ size()
int QWSSharedMemory::size |
( |
| ) |
const |
◆ shmBase
void* QWSSharedMemory::shmBase |
|
private |
◆ shmId
int QWSSharedMemory::shmId |
|
private |
◆ shmSize
int QWSSharedMemory::shmSize |
|
mutableprivate |
The documentation for this class was generated from the following files: