diff options
| author | Ian Lance Taylor <iant@golang.org> | 2014-08-04 20:40:44 -0700 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2014-08-04 20:40:44 -0700 |
| commit | ab5d105ba99e72a4f04c80df3c81725fa18527c7 (patch) | |
| tree | 98b01adc07acc17762e3d82db819d1a4727f03dd /src/pkg/runtime | |
| parent | ae55858e049179539479c325965407b4b6ebb2ec (diff) | |
| download | go-ab5d105ba99e72a4f04c80df3c81725fa18527c7.tar.xz | |
runtime: use memmove rather than memcopy in mgc0.c
For consistency with other code, as that was the only use of
memcopy outside of alg.goc.
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/122030044
Diffstat (limited to 'src/pkg/runtime')
| -rw-r--r-- | src/pkg/runtime/mgc0.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/mgc0.c b/src/pkg/runtime/mgc0.c index c46dec4105..d2a87edd14 100644 --- a/src/pkg/runtime/mgc0.c +++ b/src/pkg/runtime/mgc0.c @@ -1515,7 +1515,7 @@ runtime·ReadMemStats(MStats *stats) runtime·updatememstats(nil); // Size of the trailing by_size array differs between Go and C, // NumSizeClasses was changed, but we can not change Go struct because of backward compatibility. - runtime·memcopy(runtime·sizeof_C_MStats, stats, &mstats); + runtime·memmove(stats, &mstats, runtime·sizeof_C_MStats); // Stack numbers are part of the heap numbers, separate those out for user consumption stats->stacks_sys = stats->stacks_inuse; |
