#ifndef TDKPIN_HEAP_H #define TDKPIN_HEAP_H #include "tdkpin_borland_runtime.h" enum { BORLAND_LOCAL_HEAP_MAGIC = 0x5054, BORLAND_LOCAL_HEAP_HEADER_BYTES = 12, }; extern uint16_t g_borland_heap_segment_head; /* 1028:0706 */ extern uint16_t g_borland_local_heap_limit; /* 1028:0708 */ extern uint16_t g_borland_heap_segment_bytes; /* 1028:070a */ typedef struct { uint16_t offset; bool failed; } BorlandLocalAllocation; BorlandLocalAllocation borland_local_allocate_in_segment( uint16_t selector, uint16_t aligned_bytes); /* 1020:02a6 */ void borland_local_merge_next(uint16_t selector, uint16_t block); /* 1020:0327 */ uint16_t borland_create_local_heap_segment(void); /* 1020:026a */ BorlandAllocationAttempt borland_try_get_mem(uint16_t bytes); /* 1020:01ca */ bool borland_try_free_mem(Win16FarPtr block, uint16_t bytes); /* 1020:02d7 */ uint32_t borland_heap_free_space(void); /* 1020:0167 */ uint32_t borland_heap_largest_block(void); /* 1020:0195 */ #endif