MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / cpy

Method cpy

g2all/900/module/mem.js:467–484  ·  view source on GitHub ↗
(dst, src, len)

Source from the content-addressed store, hash-verified

465
466 // dst and src may overlap
467 cpy(dst, src, len) {
468 if (!(isInteger(len) && 0 <= len && len <= 0xffffffff)) {
469 throw TypeError('len not a unsigned 32-bit integer');
470 }
471
472 const dvals = lohi_from_one(dst);
473 const svals = lohi_from_one(src);
474 const dset = this._dst_setter;
475 const sset = this._src_setter;
476
477 dset[0] = dvals[0];
478 dset[1] = dvals[1];
479 sset[0] = svals[0];
480 sset[1] = svals[1];
481 sset[2] = len;
482
483 this._cpydst.set(this._cpysrc);
484 }
485
486 // allocate Garbage Collector managed memory. returns [address_of_memory,
487 // backer]. backer is the JSCell that is keeping the returned memory alive,

Callers 1

patch_kernelFunction · 0.45

Calls 2

lohi_from_oneFunction · 0.90
setMethod · 0.45

Tested by

no test coverage detected