Add hash map implementation for sector deduplication

This commit is contained in:
2025-09-30 20:10:40 +01:00
parent 88816c37fd
commit f6ed0f1856
6 changed files with 284 additions and 0 deletions

View File

@@ -593,6 +593,14 @@ int aaruf_close(void *context)
TRACE("Failed to write index header");
return AARUF_ERROR_CANNOT_WRITE_HEADER;
}
if(ctx->deduplicate && ctx->sectorHashMap != NULL)
{
TRACE("Clearing sector hash map");
// Clear sector hash map
free_map(ctx->sectorHashMap);
ctx->sectorHashMap = NULL;
}
}
TRACE("Freeing memory pointers");