'Allocate a new memory of `size` bytes and returns a MemInfo object
that tracks the allocation.  When there is no more reference to the
MemInfo object, the underlying memory will be deallocated.
If `safe` flag is True, the memory is allocated using the `safe` scheme.
This is used for debugging and testing purposes.
See `NRT_MemInfo_alloc_safe()` in "nrt.h" for details.'

def meminfo_alloc(self, size, safe=False):

    if safe:
        mi = _nrt.meminfo_alloc_safe(size)
    else:
        mi = _nrt.meminfo_alloc(size)
    return MemInfo(mi)
