mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
shm: Explain some fields
Explain what some of the fields in the allocator actually mean
This commit is contained in:
parent
0de362f248
commit
a7b27bc2d0
1 changed files with 8 additions and 0 deletions
|
@ -33,22 +33,30 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
/* This is the allocated space to hold multiple blocks */
|
||||||
struct _ShmAllocSpace
|
struct _ShmAllocSpace
|
||||||
{
|
{
|
||||||
|
/* The total size of this space */
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
|
/* chained list of the blocks contained in this space */
|
||||||
ShmAllocBlock *blocks;
|
ShmAllocBlock *blocks;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* A single block of data */
|
||||||
struct _ShmAllocBlock
|
struct _ShmAllocBlock
|
||||||
{
|
{
|
||||||
int use_count;
|
int use_count;
|
||||||
|
|
||||||
|
/* Pointer back to the AllocSpace where this block is */
|
||||||
ShmAllocSpace *space;
|
ShmAllocSpace *space;
|
||||||
|
|
||||||
|
/* The offset of this block in the alloc space */
|
||||||
unsigned long offset;
|
unsigned long offset;
|
||||||
|
/* The size of the block */
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
|
|
||||||
|
/* Pointer to the next block in the chain */
|
||||||
ShmAllocBlock *next;
|
ShmAllocBlock *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue