MCPcopy Create free account
hub / github.com/deepclause/agentvm / readIOVs

Function readIOVs

src/worker.js:39–47  ·  view source on GitHub ↗
(view, iovs_ptr, iovs_len)

Source from the content-addressed store, hash-verified

37
38// Helper to read IOVectors from WASM memory
39function readIOVs(view, iovs_ptr, iovs_len) {
40 const buffers = [];
41 for (let i = 0; i < iovs_len; i++) {
42 const ptr = view.getUint32(iovs_ptr + i * 8, true);
43 const len = view.getUint32(iovs_ptr + i * 8 + 4, true);
44 buffers.push(new Uint8Array(view.buffer, ptr, len));
45 }
46 return buffers;
47}
48
49// Helper to write data to IOVectors
50function writeIOVs(view, iovs_ptr, iovs_len, data) {

Callers 1

startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected