MCPcopy Index your code
hub / github.com/celzero/firestack / NewMemoryBased

Function NewMemoryBased

intra/log/memconsole.go:148–181  ·  view source on GitHub ↗

NewMemoryBased creates a Memconsole backed by page-aligned memfd regions. Returns an error if the kernel does not support memfd_create (Linux < 3.17) or if any syscall fails. The caller must close mc when done. FDs passed via LogMem should be dup(2)'d by the receiver before use.

()

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

SetupConsoleFunction · 0.92
TestMemconsoleWriteReadFunction · 0.70

Calls 3

hasmemfdFunction · 0.85
ErrorfMethod · 0.65
CloseMethod · 0.45

Tested by 1

TestMemconsoleWriteReadFunction · 0.56