MCPcopy Create free account
hub / github.com/78/tenbox / GetSharedFramebufferName

Function GetSharedFramebufferName

src/ipc/shared_framebuffer_posix.cpp:93–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93std::string GetSharedFramebufferName(const std::string& vm_id) {
94 // macOS shm_open has PSHMNAMLEN=31 (30 usable chars after leading '/').
95 // The caller appends "_<generation>" (up to 4 chars), so the base name
96 // must be at most 26 chars: "/" (1) + "tb_" (3) + 22 hex = 26.
97 std::string compact;
98 compact.reserve(32);
99 for (char c : vm_id) {
100 if (c != '-') compact += c;
101 }
102 return "/tb_" + compact.substr(0, 22);
103}
104
105} // namespace ipc

Callers 1

RuntimeControlServiceMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected