MCPcopy
hub / github.com/patriksimek/vm2 / alloc

Function alloc

lib/setup-sandbox.js:600–604  ·  view source on GitHub ↗
(size, fill, encoding)

Source from the content-addressed store, hash-verified

598// future sandbox lookups of `Buffer.alloc` route through the cap.
599const localBufferAllocOriginal = LocalBuffer.alloc;
600function alloc(size, fill, encoding) {
601 checkBufferAllocLimit(size);
602 // Use raw Reflect.apply (`apply`) here — LocalBuffer is a frozen bridge proxy.
603 return apply(localBufferAllocOriginal, LocalBuffer, arguments);
604}
605
606connect(alloc, host.Buffer.alloc);
607

Callers

nothing calls this directly

Calls 2

checkBufferAllocLimitFunction · 0.85
applyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…