fix: GC() signature

This commit is contained in:
Haolan
2025-09-19 11:37:10 +08:00
parent 66a537ad29
commit b36be05c1e

View File

@@ -352,10 +352,11 @@ func free(ptr unsafe.Pointer) {
// TODO: free blocks on request, when the compiler knows they're unused.
}
func GC() {
func GC() uintptr {
lock(&gcMutex)
gc()
freeBytes := gc()
unlock(&gcMutex)
return freeBytes
}
// runGC performs a garbage collection cycle. It is the internal implementation