Hash :
516d1a0f
Author :
Thomas de Grivel
Date :
2024-12-25T16:07:10
/* kc3
* Copyright 2022,2023,2024 kmx.io <contact@kmx.io>
*
* Permission is hereby granted to use this software granted the above
* copyright notice and this permission paragraph are included in all
* copies and substantial portions of this software.
*
* THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
* PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
#ifndef LIBKC3_ALLOC_H
#define LIBKC3_ALLOC_H
#include "types.h"
/* Library initialization. Use alloc_clean after use. */
void alloc_clean (void);
s8 alloc_init (void);
/* Heap-allocation functions. Use alloc_free after use. */
void * alloc (uw size);
void alloc_free (void *allocated);
/* Memory mapping. Use alloc_unmap after use. */
void * alloc_map (uw size);
void alloc_unmap (void *mapped, uw size);
#endif /* LIBKC3_ALLOC_H */