Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 1.26 KB

File metadata and controls

68 lines (47 loc) · 1.26 KB

libcleanmem

API Documentation

Structures

struct heap_management_instance_t {
  unsigned int total_region_count;
  struct heap_region_t* heap_regions;
};
struct heap_region_t {
  bool region_accessed;
  unsigned int region_size;
  unsigned int region_typeid;

  struct heap_region_t* prev_region;
  struct heap_region_t* next_region;

  void* region;
};

Heap Management Methods

void init_heap_management(struct heap_management_instance_t* instance);
void destroy_heap_management(struct heap_management_instance_t* instance);
void struct heap_region_t* heap_prot_malloc(struct heap_management_instance_t* instance, unsigned int bytes, unsigned int typeid);
void heap_management_add_region(struct heap_management_instance_t* instance, struct heap_region_t* region);
void heap_management_autofree_unaccessed_regions(struct heap_management_instance_t* instance);

Heap Methods

void* region_prot_heap_access(struct heap_region_t* heap);
unsigned int region_query_heap_typeid(struct heap_region_t* heap);
void region_manually_free_region(struct heap_region_t* heap);

API Documentation Status

Incomplete as of the 31st of December 2024. Requires more detailed descriptions.