Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(706)

Issue 71750048: code review 71750048: runtime: fix malloc page alignment + efence (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by rsc
Modified:
11 years, 3 months ago
Reviewers:
iant
CC:
golang-codereviews, josharian, iant, dvyukov
Visibility:
Public.

Description

runtime: fix malloc page alignment + efence Two memory allocator bug fixes. - efence is not maintaining the proper heap metadata to make eventual memory reuse safe, so use SysFault. - now that our heap PageSize is 8k but most hardware uses 4k pages, SysAlloc and SysReserve results must be explicitly aligned. Do that in a few more call sites and document this fact in malloc.h. Fixes issue 7448.

Patch Set 1 #

Patch Set 2 : diff -r 6d3659ee6de3 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 6d3659ee6de3 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 7cb38c8ff249 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -23 lines) Patch
M src/pkg/runtime/malloc.h View 1 2 chunks +6 lines, -0 lines 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 3 8 chunks +60 lines, -22 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 4
rsc
Hello golang-codereviews@googlegroups.com (cc: dvyukov, iant), I'd like you to review this change to https://code.google.com/p/go/
11 years, 3 months ago (2014-03-06 21:02:42 UTC) #1
josharian
Thanks, Russ and Dmitry.
11 years, 3 months ago (2014-03-06 21:50:16 UTC) #2
iant
LGTM
11 years, 3 months ago (2014-03-06 22:26:23 UTC) #3
rsc
11 years, 3 months ago (2014-03-06 23:34:32 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=554ebde9399a ***

runtime: fix malloc page alignment + efence

Two memory allocator bug fixes.

- efence is not maintaining the proper heap metadata
  to make eventual memory reuse safe, so use SysFault.

- now that our heap PageSize is 8k but most hardware
  uses 4k pages, SysAlloc and SysReserve results must be
  explicitly aligned. Do that in a few more call sites and
  document this fact in malloc.h.

Fixes issue 7448.

LGTM=iant
R=golang-codereviews, josharian, iant
CC=dvyukov, golang-codereviews
https://codereview.appspot.com/71750048
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b