Allow InProcessExampleBrowser to use a malloc allocated memory block, instead of system shared memory.
Make shared memory client/server a bit more robust, in case the server is terminated early.
This commit is contained in:
19
examples/SharedMemory/InProcessMemory.h
Normal file
19
examples/SharedMemory/InProcessMemory.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef IN_PROCESS_MEMORY_H
|
||||
#define IN_PROCESS_MEMORY_H
|
||||
|
||||
#include "SharedMemoryInterface.h"
|
||||
|
||||
class InProcessMemory : public SharedMemoryInterface
|
||||
{
|
||||
struct InProcessMemoryInternalData* m_data;
|
||||
|
||||
public:
|
||||
|
||||
InProcessMemory();
|
||||
virtual ~InProcessMemory();
|
||||
|
||||
virtual void* allocateSharedMemory(int key, int size, bool allowCreation);
|
||||
virtual void releaseSharedMemory(int key, int size);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user