memobj_attr_set_phys_contig()

Indicate whether a memory object needs to be physically contiguous

Synopsis:

#include <memobj/alloc.h>
void memobj_attr_set_phys_contig(struct memobj_attr *attr, enum memobj_contig_setting contig)

Arguments:

attr
The attribute structure to modify.
contig
Specifies if contiguous memory is required. The possible values include:
  • MEMOBJ_CONTIG_DONT_CARE: Use the default allocation strategy.
  • MEMOBJ_CONTIG_PREFER: Try to allocate contiguous memory, then try non-contiguous if it fails. Refer to memobj_is_always_contiguous() for more information.
  • MEMOBJ_CONTIG_REQUIRE: Fail if contiguous memory isn't available.

Library:

libmemobj

Description:

The memobj_attr_set_phys_contig() function indicates whether the memory object to be created needs to be physically contiguous.

Page updated: