972
edits
[unchecked revision] | [unchecked revision] |
No edit summary |
m (Bot: Replace deprecated source tag with syntaxhighlight) |
||
Line 2:
== Detecting memory ==
<
/* We are going to read in pairs of 1MiB and when we hit the memory limit we
* will instantly catch the program exception and stop counting, then it's just
Line 26:
return (size_t)probe;
}
</syntaxhighlight>
Now there needs to be a function to "catch" the exceptions recognized by the processor:
<
/* Check if an address is valid - this only catches program exceptions to
* determine if it's valid or not */
Line 69:
return r;
}
</syntaxhighlight>
Some C compilers are known to crash or even ABEND during compilation if addresses of labels are taken via the && operator, alternatively using direct high-level assembler syntax:
<
* HwCheckAddress
* IN:
Line 114:
DC A(AMBIT+CATCHPCR)
TMPSAVE DS 1D
</syntaxhighlight>
== See also ===
|