|
@@ -172,6 +172,11 @@ heap_t * get_owner(void *ptr);
|
|
|
#endif /* WITH_OWNERSHIP */
|
|
|
|
|
|
/**
|
|
|
+ * Check if a memory block is free
|
|
|
+ */
|
|
|
+bool is_free(void *ptr);
|
|
|
+
|
|
|
+/**
|
|
|
* Check if previous block (in the memory space) belongs to a free list
|
|
|
*/
|
|
|
bool is_previous_free(void *ptr);
|
|
@@ -195,7 +200,21 @@ size_t get_previous_size_availability(void *ptr);
|
|
|
* Get the previous memory block on data layout level
|
|
|
*
|
|
|
* \param ptr The pointer to the data part of the current memory block.
|
|
|
+ *
|
|
|
+ * \return The pointer to the data part of the previous memory block on
|
|
|
+ * data layout level.
|
|
|
*/
|
|
|
void * get_dlprevious(void *ptr);
|
|
|
|
|
|
+/**
|
|
|
+ * Get the next memory block on data layout level if there is one
|
|
|
+ *
|
|
|
+ * \param allocator The pointer to the allocator who manages the block.
|
|
|
+ * \param ptr The pointer to the data part of the current memory block.
|
|
|
+ *
|
|
|
+ * \return The pointer to the next block.
|
|
|
+ * \retval NULL There is no next block.
|
|
|
+ */
|
|
|
+void * get_dlnext(allocator_t *allocator, void *ptr);
|
|
|
+
|
|
|
#endif /* BLOCK_HEADER_H */
|