Baseline: tree as shared
This commit is contained in:
1679 files changed
+1024562
No files matched your search
@@ -0,0 +1,12 @@
|
||||
from std.memory.alloc import unsafe_alloc
|
||||
|
||||
|
||||
def main():
|
||||
# Stage a single encoder reading in a scratch buffer.
|
||||
# BUG: allocate, write the value, read it back, then release it.
|
||||
var ptr = unsafe_alloc(1)
|
||||
ptr.unsafe_write(copy=99)
|
||||
var value = ptr[]
|
||||
print("Encoder count:", value)
|
||||
ptr.unsafe_deinit_pointee()
|
||||
ptr.unsafe_free()
|
||||
Reference in new issue
Block a user