#!../pmemobjcli -s
# This is a script for pmemobjcli application intended to be used with afl.
# The script allocates, reallocates and frees objects.
# usage: ./allocate.posc <file>

# allocate root object with specified size
pmemobj_root 1024

# allocate two zeroed objects in root object
# at positions 0 and 1
pmemobj_zalloc r.0 1 256
pmemobj_zalloc r.1 2 128

# reallocate two objects
pmemobj_realloc r.0 2 512
pmemobj_zrealloc r.1 3 256

# free allocated objects
pmemobj_free r.0
pmemobj_free r.1
