MCPcopy
hub / github.com/jvilk/BrowserFS / _malloc

Function _malloc

test/tests/emscripten/bad_lookup.js:5959–5967  ·  view source on GitHub ↗
(bytes)

Source from the content-addressed store, hash-verified

5957
5958
5959 function _malloc(bytes) {
5960 /* Over-allocate to make sure it is byte-aligned by 8.
5961 * This will leak memory, but this is only the dummy
5962 * implementation (replaced by dlmalloc normally) so
5963 * not an issue.
5964 */
5965 var ptr = Runtime.dynamicAlloc(bytes + 8);
5966 return (ptr+8) & 0xFFFFFFF8;
5967 }
5968 Module["_malloc"] = _malloc;function ___cxa_allocate_exception(size) {
5969 return _malloc(size);
5970 }

Calls 5

_abortFunction · 0.70
_sysconfFunction · 0.70
_timeFunction · 0.70
_sbrkFunction · 0.70
___errno_locationFunction · 0.70

Tested by

no test coverage detected