omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / seed / rung4 / tests / h_poolhost.om
| 1 | note run-time pools, host refusal (run under prlimit --as=268435456): enlarge asks for 1 GiB, the host refuses |
| 2 | note (-12, ENOMEM); the pool is unchanged and the program goes on: a smaller enlarge then succeeds |
| 3 | global P uchar * |
| 4 | fn main to int |
| 5 | r = enlarge P 1073741824 |
| 6 | if ne len P 0 |
| 7 | ret 1 |
| 8 | end |
| 9 | s = enlarge P 4096 |
| 10 | if ne s 0 |
| 11 | ret 2 |
| 12 | end |
| 13 | put P 4095 9 |
| 14 | ret int sub long 0 r |
| 15 | end |