Results of running this:
❯ ruby ffi.rb
Allocating 1048576 via malloc in FFI
before malloc: maxrss: 37044224
before scribble: maxrss: 37093376
after scribble: maxrss: 38141952
heap_live_slots: 48069 -> 48073 (diff: 4)
heap_free_slots: 4098 -> 4094 (diff: -4)
total_allocated_objects: 151713 -> 151717 (diff: 4)
malloc_increase_bytes: 659264 -> 660640 (diff: 1376)
oldmalloc_increase_bytes: 659264 -> 660640 (diff: 1376)
Allocating 1073741824 via malloc in FFI
before malloc: maxrss: 38141952
before scribble: maxrss: 38141952
after scribble: maxrss: 1111883776
heap_live_slots: 48103 -> 48104 (diff: 1)
heap_free_slots: 4064 -> 4063 (diff: -1)
total_allocated_objects: 151747 -> 151748 (diff: 1)
malloc_increase_bytes: 661840 -> 662736 (diff: 896)
oldmalloc_increase_bytes: 661840 -> 662736 (diff: 896)