Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
10
Task/Memory-allocation/Bracmat/memory-allocation.bracmat
Normal file
10
Task/Memory-allocation/Bracmat/memory-allocation.bracmat
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
( alc$2000:?p {allocate 2000 bytes}
|
||||
& pok$(!p,123456789,4) { poke a large value as a 4 byte integer }
|
||||
& pok$(!p+4,0,4) { poke zeros in the next 4 bytes }
|
||||
& out$(pee$(!p,1)) { peek the first byte }
|
||||
& out$(pee$(!p+2,2)) { peek the short int located at the third and fourth byte }
|
||||
& out$(pee$(!p,4)) { peek the first four bytes }
|
||||
& out$(pee$(!p+6,2)) { peek the two bytes from the zeroed-out range }
|
||||
& out$(pee$(!p+1000,2)) { peek some uninitialized data }
|
||||
& fre$!p { free the memory }
|
||||
&);
|
||||
Loading…
Add table
Add a link
Reference in a new issue