Kernel/heap - Clean up a little, fix corruption in realloc, add hacky watchpoints
[tpg/acess2.git] / KernelLand / Kernel / include / heap.h
index ddb7d92..bfffcb2 100644 (file)
@@ -13,6 +13,12 @@ extern void  *Heap_Reallocate(const char *File, int Line, void *Ptr, size_t Bytes
 extern void    Heap_Deallocate(const char *File, int Line, void *Ptr);
 extern int     Heap_IsHeapAddr(void *Ptr);
 extern void    Heap_Validate(void);
+/**
+ * \brief Hint to the heap code to put a watchpoint on this block's memory
+ *
+ * Use sparingly, watchpoints are limited and/or very expensive (or not even implemented)
+ */
+extern int     Heap_WatchBlock(void *Ptr);
 
 #define malloc(size)   Heap_Allocate(_MODULE_NAME_"/"__FILE__, __LINE__, (size))
 #define calloc(num,size)       Heap_AllocateZero(_MODULE_NAME_"/"__FILE__, __LINE__, (num)*(size))

UCC git Repository :: git.ucc.asn.au