Global refactoring

This commit is contained in:
DarthSim
2021-04-26 17:52:50 +06:00
parent 6cf263cbb1
commit 2ea1466d96
100 changed files with 5405 additions and 4481 deletions

20
memory/free_linux.go Normal file
View File

@@ -0,0 +1,20 @@
// +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)
}