Areas: Addressable Physical Memories

group aml_area

Area High-Level API.

AML areas represent places where data can belong. In shared memory systems, locality is a major concern for performance. Beeing able to query memory from specific places is of a major interest two achieve this goal. AML Areas provide mmap / munmap low level functions to query memory from specific places materialized as areas. Available area implementations dictate the way such places can be arranged and with which properties. It is important to notice that function provided through Area API are low-level functions and are not optimized for performance as allocator are.

build-doxygen/xml/area.png

See

aml_area_linux

Functions

void *aml_area_mmap(const struct aml_area *area, void **ptr, size_t size)

Low-level function for getting memory from an area.

Return

virtual memory from this area with at least queried size bytes.

Parameters
  • area: A valid area implementing access to target memory.

  • ptr: Implementation specific argument. See specific header.

  • size: The usable size of memory returned.

int aml_area_munmap(const struct aml_area *area, void *ptr, size_t size)

Release data provided with aml_area_mmap() and the same area.

Return

an AML error code on operation success.

See

aml_area_mmap()

Parameters
  • area: A valid area implementing access to target memory.

  • ptr: A pointer to memory address provided with aml_area_mmap() by same area and size.

  • size: The size of memory region pointed by “ptr”.

struct aml_area_ops
#include <aml.h>

aml_area_ops is a structure containing implementations of an area operations. Aware users may create or modify implementation by assembling appropriate operations in such a structure.

struct aml_area
#include <aml.h>

An AML area is an implementation of memory operations for several type of devices through a consistent abstraction. This abstraction is meant to be implemented for several kind of devices, i.e the same function calls allocate different kinds of devices depending on the area implementation provided.