LMMS
Loading...
Searching...
No Matches
system.c File Reference
#include "system.h"
#include "serd_config.h"
#include "serd_internal.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Macros

#define _POSIX_C_SOURCE   200809L /* for posix_memalign and posix_fadvise */

Functions

FILE * serd_fopen (const char *path, const char *mode)
 Open a file configured for fast sequential reading.
voidserd_malloc_aligned (const size_t alignment, const size_t size)
 Allocate a buffer aligned to alignment bytes.
voidserd_allocate_buffer (const size_t size)
 Allocate an aligned buffer for I/O.
void serd_free_aligned (void *const ptr)
 Free a buffer allocated with an aligned allocation function.

Macro Definition Documentation

◆ _POSIX_C_SOURCE

#define _POSIX_C_SOURCE   200809L /* for posix_memalign and posix_fadvise */

Function Documentation

◆ serd_allocate_buffer()

void * serd_allocate_buffer ( const size_t size)

Allocate an aligned buffer for I/O.

◆ serd_fopen()

FILE * serd_fopen ( const char * path,
const char * mode )

Open a file configured for fast sequential reading.

◆ serd_free_aligned()

void serd_free_aligned ( void *const ptr)

Free a buffer allocated with an aligned allocation function.

◆ serd_malloc_aligned()

void * serd_malloc_aligned ( const size_t alignment,
const size_t size )

Allocate a buffer aligned to alignment bytes.