Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (set malloc (NuBridgedFunction functionWithName:"malloc" signature:"li"))
- (set memset (NuBridgedFunction functionWithName:"memset" signature:"llil"))
- (set getchar (NuBridgedFunction functionWithName:"getchar" signature:"i"))
- ;; Allocate in 100MB chunks...
- (set bytecount (* 1024 1024 100))
- (set iterations 10)
- (set i 0)
- (while (< i iterations)
- (set ptr (malloc bytecount))
- (memset ptr 1 bytecount)
- (puts "Allocating #{bytecount} bytes: #{ptr}")
- (set i (+ i 1)))
- (getchar)
Add Comment
Please, Sign In to add comment