MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / bytesToPixelsRoundedDown

Function bytesToPixelsRoundedDown

src/memoryprofiler.js:321–323  ·  view source on GitHub ↗
(bytes)

Source from the content-addressed store, hash-verified

319 // Given a pointer 'bytes', compute the linear 1D position on the graph as
320 // pixels, rounding down for start address of a block.
321 bytesToPixelsRoundedDown(bytes) {
322 return (bytes * emscriptenMemoryProfiler.canvas.width * emscriptenMemoryProfiler.canvas.height / HEAP8.length) | 0;
323 },
324
325 // Same as bytesToPixelsRoundedDown, but rounds up for the end address of a
326 // block. The different rounding will guarantee that even 'thin' allocations

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected