byos: Ease `GeneralPurposeAllocator` integration

These changes enable me to use `GeneralPurposeAllocator` with my "Bring
Your Own OS" package. The previous checks for a freestanding target have
been expanded to `@hasDecl` checks.

- `root.os.heap.page_allocator` is used if it exists.
- `debug.isValidMemory` only calls `os.msync` if it's supported.
fd43baa9adJay Petacat committed on 1/16/2024, 11:05:38 PM· committed by Andrew Kelleyparenta338c27
2 files changedLine totals unavailable