acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
shared_memory.h
1#pragma once
2
3
4#include "acme/operating_system/shared_memory.h"
5#include "acme/_operating_system.h"
6
7
8namespace windows
9{
10
11 class CLASS_DECL_ACME shared_memory :
12 virtual public ::shared_memory
13 {
14 public:
15
16
17 //::u32 m_nAllocFlags;
18 //HGLOBAL m_hGlobalMemory;
19 memsize m_memsize;
20 HANDLE m_hToMap;
21 //void *m_memory;
22
23 //bool m_bAllowGrow;
24
25
26 //shared_memory(const memory_base & memory);
27 //shared_memory(memory_container * pmsc = nullptr, ::f64 dAllocationRateUp = 4096, ::u32 nAllocFlags = 0);
28 //shared_memory(memory_container * pmsc, const void * pMemory, memsize dwSize);
29 //shared_memory(const void *, memsize iCount);
30 shared_memory();
31 ~shared_memory() override;
32
33
34 //virtual void SetHandle(HGLOBAL hGlobalMemory, bool bAllowGrow = true);
35
36 void CreateSharedMemory(const_char_pointer pszName, memsize size) override;
37 void OpenSharedMemory(const_char_pointer pszName, memsize size) override;
38
39 //virtual ::u8 * impl_alloc(memsize nBytes) override;
40 //virtual ::u8 * impl_realloc(void * pdata, memsize nBytes) override;
41 //virtual void impl_free(::u8 * pMem) override;
42
43void Close() override;
44
45 //::u8 * detach_shared_memory(HGLOBAL & hglobal);
46 //::u8 * detach(HGLOBAL & hglobal);
47 // virtual bool allocate_internal(memsize dwNewLength);
48
49 protected:
50
51 virtual bool _createFile(const_char_pointer pszName, memsize size);
52 virtual void _mapViewOfFile();
53 virtual void _setAllAccess(HANDLE handle);
54
55 //virtual ::matter * clone() override;
56
57 };
58
59
60} // namespace windows
61
62
Definition handle.h:13