Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (16 sloc) 238 Bytes
// +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)
}
You can’t perform that action at this time.