67#if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION)
68# error "Header files shouldn't be included directly, consider using <plibsys.h> instead."
71#ifndef PLIBSYS_HEADER_PMEM_H
72#define PLIBSYS_HEADER_PMEM_H
struct PError_ PError
Opaque data structure for an error object.
#define P_BEGIN_DECLS
Starts .h file declarations to be exported as C functions.
#define P_END_DECLS
Closes .h file declarations to be exported as C functions, should be always used after P_BEGIN_DECLS.
#define P_LIB_API
Exports a symbol from a shared library.
P_LIB_API ppointer p_malloc0(psize n_bytes)
Allocates a memory block for the specified number of bytes and fills it with zeros.
P_LIB_API pboolean p_mem_munmap(ppointer mem, psize n_bytes, PError **error)
Unmaps memory back to the system.
P_LIB_API ppointer p_malloc(psize n_bytes)
Allocates a memory block for the specified number of bytes.
struct PMemVTable_ PMemVTable
Memory management table.
P_LIB_API ppointer p_mem_mmap(psize n_bytes, PError **error)
Gets a memory mapped block from the system.
P_LIB_API void p_mem_restore_vtable(void)
Restores system memory management routines.
P_LIB_API void p_free(ppointer mem)
Frees a memory block by its pointer.
P_LIB_API pboolean p_mem_set_vtable(const PMemVTable *table)
Sets custom memory management routines.
P_LIB_API ppointer p_realloc(ppointer mem, psize n_bytes)
Changes the memory block size.
unsigned int psize
Type for a platform independent size_t.
void * ppointer
Type for a pointer.
signed int pboolean
Type for a bool.
void(* f_free)(ppointer mem)
free() implementation.
ppointer(* f_realloc)(ppointer mem, psize n_bytes)
realloc() implementation.
ppointer(* f_malloc)(psize n_bytes)
malloc() implementation.