Add malloc_trim after reduce search result (#17423)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
pull/17433/head
bigsheeper 2022-06-08 00:12:05 +08:00 committed by GitHub
parent 71a00f0551
commit af108b5bda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -9,8 +9,11 @@
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License
#include <vector>
#ifndef __APPLE__
#include <malloc.h>
#endif
#include <vector>
#include "Reduce.h"
#include "common/CGoHelper.h"
#include "common/QueryResult.h"
@ -84,4 +87,7 @@ DeleteSearchResultDataBlobs(CSearchResultDataBlobs cSearchResultDataBlobs) {
}
auto search_result_data_blobs = reinterpret_cast<milvus::segcore::SearchResultDataBlobs*>(cSearchResultDataBlobs);
delete search_result_data_blobs;
#ifdef __linux__
malloc_trim(0);
#endif
}