Indent comments to 12*4 spaces
@@ -301,11 +301,10 @@ mem_free(void* ptr) {
if ((block->size & mem_alloc_bit) && block->next == NULL) {
/*
* Clear allocated bit before entering back to free list
- * List will automatically take care for fragmentation and mix segments back
+ * List will automatically take care for fragmentation
*/
block->size &= ~mem_alloc_bit; /* Clear allocated bit */
mem_available_bytes += block->size; /* Increase available bytes back */
- /* ESP_MEMSET(ptr, 0x00, block->size - MEMBLOCK_METASIZE); */
mem_insertfreeblock(block); /* Insert block to list of free blocks */
}
}
@@ -464,7 +463,7 @@ esp_mem_free(void* ptr) {
"[MEM] Free size: %d, address: %p\r\n",
(int)MEM_BLOCK_USER_SIZE(ptr), ptr);
esp_core_lock();
- mem_free(ptr); /* Free already allocated memory */
+ mem_free(ptr);
esp_core_unlock();
}
