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

Method get_memories

tools/webassembly.py:478–489  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

476
477 @memoize
478 def get_memories(self):
479 section = self.get_section(SecType.MEMORY)
480 if not section:
481 return []
482 memories = []
483 self.seek(section.offset)
484 num_memories = self.read_uleb()
485 for _ in range(num_memories):
486 limits = self.read_limits()
487 memories.append(Memory(limits))
488
489 return memories
490
491 def get_section(self, section_code):
492 return next((s for s in self.sections() if s.type == section_code), None)

Callers 1

is_64Method · 0.80

Calls 6

get_sectionMethod · 0.95
seekMethod · 0.95
read_ulebMethod · 0.95
read_limitsMethod · 0.95
appendMethod · 0.80
rangeFunction · 0.50

Tested by 1

is_64Method · 0.64