mem.h File Reference
Include dependency graph for mem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

class | pw_memblock
| Memory block structure. More...
struct | pw_map_range
| parameters to map a memory range More...

## Macros

#define | PW_MEMBLOCK_FLAG_MAP_READWRITE (PW_MEMBLOCK_FLAG_MAP_READ | PW_MEMBLOCK_FLAG_MAP_WRITE)
#define | PW_MAP_RANGE_INIT (struct pw_map_range){ 0, }

## Functions

int | pw_memblock_alloc (enum pw_memblock_flags flags, size_t size, struct pw_memblock **mem)
int | pw_memblock_import (enum pw_memblock_flags flags, int fd, off_t offset, size_t size, struct pw_memblock **mem)
int | pw_memblock_map (struct pw_memblock *mem)
void | pw_memblock_free (struct pw_memblock *mem)
struct pw_memblock * | pw_memblock_find (const void *ptr)
| Find memblock for given ptr. More...

## Macro Definition Documentation

## PW_MAP_RANGE_INIT

#define PW_MAP_RANGE_INIT (struct pw_map_range){ 0, }

## PW_MEMBLOCK_FLAG_MAP_READWRITE

#define PW_MEMBLOCK_FLAG_MAP_READWRITE (PW_MEMBLOCK_FLAG_MAP_READ | PW_MEMBLOCK_FLAG_MAP_WRITE)

Referenced by pw_control_link(), and pw_memblock::pw_memblock_map().

## Function Documentation

## pw_memblock_alloc()

int pw_memblock_alloc | ( | enum pw_memblock_flags | flags,
|  | size_t | size,
|  | struct pw_memblock ** | mem
| ) |  |

Referenced by pw_control_link(), and pw_memblock_import().

## pw_memblock_find()

struct pw_memblock* pw_memblock_find | ( | const void * | ptr | ) |

Find memblock for given ptr.

## pw_memblock_free()

void pw_memblock_free | ( | struct pw_memblock * | mem | ) |

Referenced by pw_control_destroy().

## pw_memblock_import()

int pw_memblock_import | ( | enum pw_memblock_flags | flags,
|  | int | fd,
|  | off_t | offset,
|  | size_t | size,
|  | struct pw_memblock ** | mem
| ) |  |

References pw_memblock::fd, pw_memblock::flags, pw_memblock::offset, pw_memblock_alloc(), pw_memblock_map(), and pw_memblock::size.

## pw_memblock_map()

int pw_memblock_map | ( | struct pw_memblock * | mem | ) |

Referenced by pw_memblock::pw_memblock_alloc(), and pw_memblock_import().