MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / memwatch_setup

Function memwatch_setup

src/debug.cpp:4893–4913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4891}
4892
4893static void memwatch_setup(void)
4894{
4895 memwatch_reset();
4896 mwnodes_start = MEMWATCH_TOTAL - 1;
4897 mwnodes_end = 0;
4898 for (int i = 0; i < MEMWATCH_TOTAL; i++) {
4899 struct memwatch_node *m = &mwnodes[i];
4900 if (!m->size)
4901 continue;
4902 if (mwnodes_start > i)
4903 mwnodes_start = i;
4904 if (mwnodes_end < i)
4905 mwnodes_end = i;
4906 int addr = m->addr & ~65535;
4907 int eaddr = (m->addr + m->size + 65535) & ~65535;
4908 while (addr < eaddr) {
4909 memwatch_remap(addr);
4910 addr += 65536;
4911 }
4912 }
4913}
4914
4915static int deinitialize_memwatch (void)
4916{

Callers 3

debug_bankchangeFunction · 0.85
memwatchFunction · 0.85
debug_trainer_enableFunction · 0.85

Calls 2

memwatch_resetFunction · 0.85
memwatch_remapFunction · 0.85

Tested by

no test coverage detected