1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-08 10:45:04 +02:00
imgproxy/memory/free_linux.go
2021-05-07 17:10:21 +06:00

21 lines
234 B
Go

// +build linux
package memory
/*
#include <features.h>
#ifdef __GLIBC__
#include <malloc.h>
#else
void malloc_trim(size_t pad){}
#endif
*/
import "C"
import "runtime/debug"
func Free() {
debug.FreeOSMemory()
C.malloc_trim(0)
}