implement malloc calloc and realloc
 Here is a simple implementation of `malloc`, `calloc`, and `realloc` using `sbrk` system call for memory allocation. Note that this is a basic implementation and may not handle all edge cases. Also, in a real-world scenario, you should use the memory allocation functions provided by the standard library instead of implementing your own.
```c
#include <unistd.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>

#define HEADER_SIZE sizeof(struct header)

typedef struct header {
    size_t size;
    struct header *next;
} header_t;

static header_t *head = (void*)0;
static header_t *current_block = (void*)0;
static header_t *prev_block = (void*)0;

void *my_sbrk(int incr) {
    void *current_break;
    current_break = sbrk(0);
    return sbrk(incr);
}

void *my_malloc(size_t num_bytes) {
    header_t *new_block, *scan_block;
    char *payload_ptr;
    size_t true_size;

    if (num_bytes
Here is an implementation of `malloc`, `calloc`, and `realloc` in C:
```
#include <stdio.h>
#include <stdint.h>
#include <string.h>

// Structure to represent a block of memory
typedef struct {
    size_t size; // size of the block
    int free; // 1 if the block is free, 0 otherwise
    struct block* next; // pointer to the next block
} block;

// Global pointer to the head of the free list
block* free_list = NULL;

// Function to initialize the memory allocator
void init_allocator(size_t size) {
    // Create a single block of memory to start with
    block* b = (block*)malloc(size);
    b->size = size;
    b->free = 1;
    b->next = NULL;
    free_list = b;
}

// Function to split a block of memory into two smaller blocks
void split_block(block* b, size_t size) {
    // Calculate the size of the remaining block
    size_t remaining_size = b->size - size;
    // Create a new block for the remaining memory
    block* new_b = (block*)((void*)b + size);
    new_b->size = remaining_size;
    new_b->free = 1;
    new_b->next = b->next;
    // Update the original block
    b->size = size;
    b->next = new_b;
