VLC  3.0.15
Macros | Functions
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 BlockNoRelease (block_t *b)
 
static void block_Check (block_t *block)
 
static void block_Invalidate (block_t *block)
 
void block_Init (block_t *restrict b, 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...
 
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...
 

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

References block_Invalidate(), and block_t::p_start.

Referenced by block_Alloc().

◆ block_heap_Release()

static void block_heap_Release ( block_t block)
static

References block_Invalidate(), and block_t::p_start.

Referenced by block_heap_Alloc().

◆ block_Init()

void block_Init ( block_t *restrict  b,
void *  buf,
size_t  size 
)

References BlockNoRelease(), and VLC_TS_INVALID.

Referenced by block_Alloc(), and block_heap_Alloc().

◆ block_Invalidate()

static void block_Invalidate ( block_t block)
static

◆ BlockMetaCopy()

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

◆ BlockNoRelease()

static void BlockNoRelease ( block_t b)
static