mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-24 08:12:38 +02:00
21 lines
238 B
Go
21 lines
238 B
Go
// +build linux
|
|
|
|
package main
|
|
|
|
/*
|
|
#include <features.h>
|
|
#ifdef __GLIBC__
|
|
#include <malloc.h>
|
|
#else
|
|
void malloc_trim(size_t pad){}
|
|
#endif
|
|
*/
|
|
import "C"
|
|
import "runtime/debug"
|
|
|
|
func freeMemory() {
|
|
debug.FreeOSMemory()
|
|
|
|
C.malloc_trim(0)
|
|
}
|