allocaBytes n f executes the computation f, passing as argument a
pointer to a temporarily allocated block of memory of n bytes.
The block of memory is sufficiently aligned for any of the basic foreign types
that fits into a memory block of the allocated size.

The memory is freed when f terminates (either normally or via an exception).

This should provide a safer replacement for:
Foreign.Marshal.Alloc.allocaBytes.