diff --git a/internal/debug/api.go b/internal/debug/api.go
index 83857eb2e1c5c63b9e9a4785a5be7e19dd183ba7..2cb264040d349dac5dfc89674ef40047a349b3b8 100644
--- a/internal/debug/api.go
+++ b/internal/debug/api.go
@@ -27,6 +27,7 @@ import (
 	"os/user"
 	"path/filepath"
 	"runtime"
+	"runtime/debug"
 	"runtime/pprof"
 	"strings"
 	"sync"
@@ -69,6 +70,20 @@ func (*HandlerT) BacktraceAt(location string) error {
 	return glog.GetTraceLocation().Set(location)
 }
 
+// MemStats returns detailed runtime memory statistics.
+func (*HandlerT) MemStats() *runtime.MemStats {
+	s := new(runtime.MemStats)
+	runtime.ReadMemStats(s)
+	return s
+}
+
+// GcStats returns GC statistics.
+func (*HandlerT) GcStats() *debug.GCStats {
+	s := new(debug.GCStats)
+	debug.ReadGCStats(s)
+	return s
+}
+
 // CpuProfile turns on CPU profiling for nsec seconds and writes
 // profile data to file.
 func (h *HandlerT) CpuProfile(file string, nsec uint) error {
diff --git a/rpc/javascript.go b/rpc/javascript.go
index 166a5289c971c068950b355bbfd08a2e0e77994b..475691a874a2b54b80d6de841fdd90a9dc06710a 100644
--- a/rpc/javascript.go
+++ b/rpc/javascript.go
@@ -327,6 +327,16 @@ web3._extend({
 			params: 0,
 			outputFormatter: console.log
 		}),
+		new web3._extend.Method({
+			name: 'memStats',
+			call: 'debug_memStats',
+			params: 0,
+		}),
+		new web3._extend.Method({
+			name: 'gcStats',
+			call: 'debug_gcStats',
+			params: 0,
+		}),
 		new web3._extend.Method({
 			name: 'cpuProfile',
 			call: 'debug_cpuProfile',