k-chow/libs/libk/malloc-k.h
Julien CLEMENT 7178dbb6a7 feat: add given files
Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
2021-07-12 15:57:08 +02:00

34 lines
600 B
C

#include <k/kstd.h>
#include <k/types.h>
#include <stdio.h>
#define HAVE_MMAP 0
#define USE_LOCKS 0
#define NO_MALLOC_STATS 1
#define LACKS_TIME_H
#define LACKS_UNISTD_H
#define LACKS_STDLIB_H
#define LACKS_ERRNO_H
#define LACKS_SYS_TYPES_H
#define malloc_getpagesize 4096
#define MALLOC_FAILURE_ACTION \
do { \
printf("[!] malloc internal error \n"); \
} while(0)
#define USAGE_ERROR_ACTION(m, p) \
do { \
printf("[!] malloc: corrupted chunk: 0x%x\n", p); \
} while (0)
#define abort() \
do { \
printf("[!!!] malloc: abort\n"); \
for (;;) \
continue; \
} while(0)