Yet Another Malloc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
405 B

/*
* Yet Another Malloc
* yamalloc.h
*/
#ifndef YAMALLOC_H
#define YAMALLOC_H
#include <stddef.h>
#ifdef YA_DEBUG
#define ya_debug(...) fprintf(stderr, __VA_ARGS__)
void ya_print_blocks();
#else
#define ya_debug(...)
#define ya_print_blocks(...)
#endif
void *malloc(size_t size);
void free(void *ptr);
void *calloc(size_t nmemb, size_t size);
void *realloc(void *ptr, size_t size);
#endif