Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
Release free mem in diskann aligned_free function (#520)
Browse files Browse the repository at this point in the history
Signed-off-by: cqy123456 <[email protected]>

Signed-off-by: cqy123456 <[email protected]>
  • Loading branch information
cqy123456 authored and Li Liu committed Nov 7, 2022
1 parent c53d9b6 commit c3ce51c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions thirdparty/DiskANN/include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ namespace diskann {
#else
::_aligned_free(ptr);
#endif
if (malloc_trim(0) == 0) {
LOG(DEBUG) << "Failed to release free memory from the heap.";
}
}

inline void GenRandom(std::mt19937& rng, unsigned* addr, unsigned size,
Expand Down

0 comments on commit c3ce51c

Please sign in to comment.