
albeit a few small differences i think the code had different names
in your heap.c

and
#ifdef _WIN32
#include <windows.h>
#else
// to do
#endif
well if its linux
#ifdef _WIN32
#include <windows.h>
#else if defined(_linux)
#include<mman.h> // linux memory manager functions
#endif
allthough some modifications might be nessesary in the code where you wrote
#ifdef _WIN32
VirtualAlloc (ht->hunkbuffer + ht->used, 65536, MEM_COMMIT, PAGE_READWRITE);
#else if defined(_linux)
// to do
mmap(*linux equivalent parameters*);
#endif
VirtualFree is munmap on linux the parameters for both are a bit different though.