Index: src/pkg/runtime/debug.go |
=================================================================== |
--- a/src/pkg/runtime/debug.go |
+++ b/src/pkg/runtime/debug.go |
@@ -21,16 +21,19 @@ func UnlockOSThread() |
// simultaneously and returns the previous setting. If n < 1, it does not |
// change the current setting. |
// This call will go away when the scheduler improves. |
func GOMAXPROCS(n int) int |
// Cgocalls returns the number of cgo calls made by the current process. |
func Cgocalls() int64 |
+// Goroutines returns the number of goroutines that currently exist. |
+func Goroutines() int32 |
+ |
type MemStatsType struct { |
// General statistics. |
// Not locked during update; approximate. |
Alloc uint64 // bytes allocated and still in use |
TotalAlloc uint64 // bytes allocated (even if freed) |
Sys uint64 // bytes obtained from system (should be sum of XxxSys below) |
Lookups uint64 // number of pointer lookups |
Mallocs uint64 // number of mallocs |