VLC  4.0.0-dev
Macros | Functions | Variables
block.c File Reference
Include dependency graph for block.c:

Macros

#define BLOCK_ALIGN   32
 Initial memory alignment of data block. More...
 
#define BLOCK_PADDING   32
 Initial reserved header and footer size. More...
 
#define S_TYPEISSHM(buf)   (0)
 

Functions

static void block_Check (block_t *block)
 
block_tblock_Init (block_t *restrict b, const struct vlc_block_callbacks *cbs, void *buf, size_t size)
 
static void block_generic_Release (block_t *block)
 
static void BlockMetaCopy (block_t *restrict out, const block_t *in)
 
block_tblock_Alloc (size_t size)
 Allocates a block. More...
 
void block_Release (block_t *block)
 Releases a block. More...
 
block_tblock_TryRealloc (block_t *p_block, ssize_t i_prebody, size_t i_body)
 
block_tblock_Realloc (block_t *block, ssize_t prebody, size_t body)
 Reallocates a block. More...
 
static void block_heap_Release (block_t *block)
 
block_tblock_heap_Alloc (void *addr, size_t length)
 Wraps heap in a block. More...
 
block_tblock_mmap_Alloc (void *addr, size_t length)
 Wraps a memory mapping in a block. More...
 
block_tblock_shm_Alloc (void *addr, size_t length)
 Wraps a System V memory segment in a block. More...
 
block_tblock_File (int fd, bool write)
 Maps a file handle in memory. More...
 
block_tblock_FilePath (const char *path, bool write)
 Maps a file in memory. More...
 

Variables

static const struct vlc_block_callbacks block_generic_cbs
 
static const struct vlc_block_callbacks block_heap_cbs
 

Macro Definition Documentation

◆ BLOCK_ALIGN

#define BLOCK_ALIGN   32

Initial memory alignment of data block.

Note
This must be a multiple of sizeof(void*) and a power of two. libavcodec AVX optimizations require at least 32-bytes.

◆ BLOCK_PADDING

#define BLOCK_PADDING   32

Initial reserved header and footer size.

◆ S_TYPEISSHM

#define S_TYPEISSHM (   buf)    (0)

Function Documentation

◆ block_Check()

static void block_Check ( block_t block)
static

◆ block_generic_Release()

static void block_generic_Release ( block_t block)
static

◆ block_heap_Release()

static void block_heap_Release ( block_t block)
static

◆ block_Init()

block_t* block_Init ( block_t *restrict  b,
const struct vlc_block_callbacks cbs,
void *  buf,
size_t  size 
)

◆ BlockMetaCopy()

static void BlockMetaCopy ( block_t *restrict  out,
const block_t in 
)
static

Variable Documentation

◆ block_generic_cbs

const struct vlc_block_callbacks block_generic_cbs
static
Initial value:
=
{
}
static void block_generic_Release(block_t *block)
Definition: block.c:78

Referenced by block_Alloc().

◆ block_heap_cbs

const struct vlc_block_callbacks block_heap_cbs
static
Initial value:
=
{
}
static void block_heap_Release(block_t *block)
Definition: block.c:243

Referenced by block_heap_Alloc().