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

Method gc_alloc

g2all/700/module/mem.js:230–246  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

228 // the backer is an implementation detail. don't use it to mutate the
229 // memory
230 gc_alloc(size) {
231 if (!isInteger(size)) {
232 throw TypeError("size not a integer");
233 }
234 if (size < 0) {
235 throw RangeError("size is negative");
236 }
237
238 const fastLimit = 1000;
239 size = ((size + 7) & ~7) >> 3;
240 if (size > fastLimit) {
241 throw RangeError("size is too large");
242 }
243
244 const backer = new Float64Array(size);
245 return [mem.addrof(backer).readp(view_m_vector), backer];
246 }
247
248 fakeobj(addr) {
249 const values = lohi_from_one(addr);

Callers 8

constructorMethod · 0.45
initFunction · 0.45
constructorMethod · 0.45
initFunction · 0.45
constructorMethod · 0.45
initFunction · 0.45
constructorMethod · 0.45
initFunction · 0.45

Calls 2

readpMethod · 0.45
addrofMethod · 0.45

Tested by

no test coverage detected