libvisual
0.5.0
|
Macros | |
#define | visual_mem_new0(struct_type, n_structs) ((struct_type *) visual_mem_malloc0 (((visual_size_t) sizeof (struct_type)) * ((visual_size_t) (n_structs)))) |
Convenience macro to allocate an array with visual_mem_malloc0(). More... | |
Typedefs | |
typedef void *(* | VisMemCopyFunc )(void *dest, const void *src, visual_size_t n) |
The visual_mem_copy function needs this signature. More... | |
typedef void *(* | VisMemCopyPitchFunc )(void *dest, const void *src, int pitch1, int pitch2, int width, int rows) |
The visual_mem_copy_pitch function needs this signature. More... | |
typedef void *(* | VisMemSet8Func )(void *dest, int c, visual_size_t n) |
The visual_mem_set function needs this signature. More... | |
typedef void *(* | VisMemSet16Func )(void *dest, int c, visual_size_t n) |
The visual_mem_set16 function needs this signature. More... | |
typedef void *(* | VisMemSet32Func )(void *dest, int c, visual_size_t n) |
The visual_mem_set32 function needs this signature. More... | |
Functions | |
void * | visual_mem_malloc (visual_size_t size) LV_ATTR_MALLOC |
Allocates a block of memory. More... | |
void * | visual_mem_malloc0 (visual_size_t size) LV_ATTR_MALLOC |
Allocates a block of memory with its content zeroed. More... | |
void * | visual_mem_realloc (void *ptr, visual_size_t size) LV_ATTR_MALLOC |
Reallocates memory, can be used to grow a buffer. More... | |
void | visual_mem_free (void *ptr) |
Frees a memory block allocated by visual_mem_malloc() and visual_mem_realloc(). More... | |
void * | visual_mem_malloc_aligned (visual_size_t size, visual_size_t alignment) |
Allocates a memory block aligned to a given address boundary. More... | |
void | visual_mem_free_aligned (void *ptr) |
Frees a memory block allocated by visual_mem_alloc_aligned(). More... | |
Variables | |
VisMemCopyFunc | visual_mem_copy |
VisMemCopyPitchFunc | visual_mem_copy_pitch |
VisMemSet8Func | visual_mem_set |
VisMemSet16Func | visual_mem_set16 |
VisMemSet32Func | visual_mem_set32 |
#define visual_mem_new0 | ( | struct_type, | |
n_structs | |||
) | ((struct_type *) visual_mem_malloc0 (((visual_size_t) sizeof (struct_type)) * ((visual_size_t) (n_structs)))) |
Convenience macro to allocate an array with visual_mem_malloc0().
struct_type | Type of struct |
n_structs | Number of elements |
typedef void*(* VisMemCopyFunc)(void *dest, const void *src, visual_size_t n) |
typedef void*(* VisMemCopyPitchFunc)(void *dest, const void *src, int pitch1, int pitch2, int width, int rows) |
The visual_mem_copy_pitch function needs this signature.
This function supports a negative pitch.
typedef void*(* VisMemSet16Func)(void *dest, int c, visual_size_t n) |
typedef void*(* VisMemSet32Func)(void *dest, int c, visual_size_t n) |
typedef void*(* VisMemSet8Func)(void *dest, int c, visual_size_t n) |
void visual_mem_free | ( | void * | ptr | ) |
Frees a memory block allocated by visual_mem_malloc() and visual_mem_realloc().
ptr | Frees memory to which ptr points to |
void visual_mem_free_aligned | ( | void * | ptr | ) |
Frees a memory block allocated by visual_mem_alloc_aligned().
ptr | Pointer to memory block |
void* visual_mem_malloc | ( | visual_size_t | size | ) |
Allocates a block of memory.
size | Size in bytes |
Definition at line 111 of file lv_mem.c.
Referenced by visual_mem_malloc0().
void* visual_mem_malloc0 | ( | visual_size_t | size | ) |
void* visual_mem_malloc_aligned | ( | visual_size_t | size, |
visual_size_t | alignment | ||
) |
Allocates a memory block aligned to a given address boundary.
size | Size in bytes |
alignment | Address alignment |