demo/js/optipng.js
function getMemory(size) {
  if (!staticSealed) return staticAlloc(size);
  if (!runtimeInitialized) return dynamicAlloc(size);
  return _malloc(size);
}
function getMemory(size) {
  if (!staticSealed) return staticAlloc(size);
  if (!runtimeInitialized) return dynamicAlloc(size);
  return _malloc(size);
}
function getMemory ( size ) { if ( ! staticSealed ) return staticAlloc ( size ) ; if ( ! runtimeInitialized ) return dynamicAlloc ( size ) ; return _malloc ( size ) ; }
Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready
Allocate memory during any stage of startup - static memory early on dynamic memory later malloc when ready