MCPcopy Create free account
hub / github.com/apache/nuttx / host_allocshmem

Function host_allocshmem

arch/sim/src/sim/win/sim_hostmemory.c:61–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void *host_allocshmem(const char *name, size_t size)
62{
63 HANDLE handle;
64 void *mem;
65
66 handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL,
67 PAGE_READWRITE, 0, 0, name);
68 if (handle == NULL)
69 {
70 return NULL;
71 }
72
73 mem = MapViewOfFile(handle, FILE_MAP_ALL_ACCESS, 0, 0, size);
74 CloseHandle(handle);
75
76 return mem;
77}
78
79void host_freeshmem(void *mem)
80{

Callers 3

sim_rptun_get_resourceFunction · 0.50
sim_uartram_registerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected