summaryrefslogtreecommitdiff
path: root/src/malloc/malloc_usable_size.c
blob: 7a8ed6c401e632fc516757402d4dd417f030d15e (plain) (blame)
1
2
3
4
5
6
7
8
9
#include <malloc.h>
#include "malloc_impl.h"

void *(*const __realloc_dep)(void *, size_t) = realloc;

size_t malloc_usable_size(void *p)
{
	return p ? CHUNK_SIZE(MEM_TO_CHUNK(p)) - OVERHEAD : 0;
}