interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / aienux / connector / gates / hostile / memhog.om

97 lines · 1328 bytes Raw Blame History
1note hostile probe: touch 192 MiB of memory (12 arrays of 16 MiB); prints how many MiB it touched
2global g0 uchar 16777216
3global g1 uchar 16777216
4global g2 uchar 16777216
5global g3 uchar 16777216
6global g4 uchar 16777216
7global g5 uchar 16777216
8global g6 uchar 16777216
9global g7 uchar 16777216
10global g8 uchar 16777216
11global g9 uchar 16777216
12global g10 uchar 16777216
13global g11 uchar 16777216
14text m1 "touched MiB "
15text nl "\n"
16fn t0 to void
17for i ulong 4096
18put g0 mul i 4096 1
19end
20end
21fn t1 to void
22for i ulong 4096
23put g1 mul i 4096 1
24end
25end
26fn t2 to void
27for i ulong 4096
28put g2 mul i 4096 1
29end
30end
31fn t3 to void
32for i ulong 4096
33put g3 mul i 4096 1
34end
35end
36fn t4 to void
37for i ulong 4096
38put g4 mul i 4096 1
39end
40end
41fn t5 to void
42for i ulong 4096
43put g5 mul i 4096 1
44end
45end
46fn t6 to void
47for i ulong 4096
48put g6 mul i 4096 1
49end
50end
51fn t7 to void
52for i ulong 4096
53put g7 mul i 4096 1
54end
55end
56fn t8 to void
57for i ulong 4096
58put g8 mul i 4096 1
59end
60end
61fn t9 to void
62for i ulong 4096
63put g9 mul i 4096 1
64end
65end
66fn t10 to void
67for i ulong 4096
68put g10 mul i 4096 1
69end
70end
71fn t11 to void
72for i ulong 4096
73put g11 mul i 4096 1
74end
75end
76fn main to int
77d = new uchar 8 0
78t0
79t1
80t2
81t3
82t4
83t5
84t6
85t7
86t8
87t9
88t10
89t11
90k = write 1 m1 0 len m1
91put d 0 49
92put d 1 57
93put d 2 50
94k = write 1 d 0 3
95k = write 1 nl 0 len nl
96ret 0
97end