diff --git a/internal/core/src/segcore/reduce_c.cpp b/internal/core/src/segcore/reduce_c.cpp index 9e11751080..2ef9aa7b1a 100644 --- a/internal/core/src/segcore/reduce_c.cpp +++ b/internal/core/src/segcore/reduce_c.cpp @@ -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 +#ifndef __APPLE__ +#include +#endif +#include #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(cSearchResultDataBlobs); delete search_result_data_blobs; +#ifdef __linux__ + malloc_trim(0); +#endif }