runtime: get rid of free
Several reasons:
1. Significantly simplifies runtime.
2. This code proved to be buggy.
3. Free is incompatible with bump-the-pointer allocation.
4. We want to write runtime in Go, Go does not have free.
5. Too much code to free env strings on startup.
Hello golang-codereviews@googlegroups.com (cc: bradfitz@golang.org, khr@golang.org, r@golang.org, rlh@golang.org, rsc@golang.org), I'd like you to review this change ...
10 years, 9 months ago
(2014-07-29 11:17:39 UTC)
#1
https://codereview.appspot.com/116390043/diff/20002/src/pkg/runtime/env_posix.c File src/pkg/runtime/env_posix.c (right): https://codereview.appspot.com/116390043/diff/20002/src/pkg/runtime/env_posix.c#newcode55 src/pkg/runtime/env_posix.c:55: // so that they are not allocated using tiny ...
10 years, 9 months ago
(2014-07-29 13:32:55 UTC)
#2
The new malloc.go has the comment: "// If the block will be freed with runtime·free(), ...
10 years, 9 months ago
(2014-07-30 16:15:01 UTC)
#5
The new malloc.go has the comment: "// If the block will be freed with
runtime·free(), typ must be nil.". It seems that something will need to change
(if only the comment) once free goes away.
LGTM. https://codereview.appspot.com/116390043/diff/80001/src/pkg/runtime/mcentral.c File src/pkg/runtime/mcentral.c (left): https://codereview.appspot.com/116390043/diff/80001/src/pkg/runtime/mcentral.c#oldcode209 src/pkg/runtime/mcentral.c:209: if(s->incache) It would be nice to have some ...
10 years, 9 months ago
(2014-07-30 23:41:07 UTC)
#6
*** Submitted as https://code.google.com/p/go/source/detail?r=6acc2dd545b2 *** runtime: get rid of free Several reasons: 1. Significantly simplifies ...
10 years, 9 months ago
(2014-07-31 08:55:45 UTC)
#8
*** Submitted as https://code.google.com/p/go/source/detail?r=6acc2dd545b2 ***
runtime: get rid of free
Several reasons:
1. Significantly simplifies runtime.
2. This code proved to be buggy.
3. Free is incompatible with bump-the-pointer allocation.
4. We want to write runtime in Go, Go does not have free.
5. Too much code to free env strings on startup.
LGTM=khr
R=golang-codereviews, josharian, tracey.brendan, khr
CC=bradfitz, golang-codereviews, r, rlh, rsc
https://codereview.appspot.com/116390043
mailed https://codereview.appspot.com/120400043 it become outdated when we've removed settype caching thanks On Wed, Jul 30, ...
10 years, 9 months ago
(2014-07-31 12:16:10 UTC)
#10
mailed https://codereview.appspot.com/120400043
it become outdated when we've removed settype caching
thanks
On Wed, Jul 30, 2014 at 8:14 PM, <tracey.brendan@gmail.com> wrote:
> The new malloc.go has the comment: "// If the block will be freed with
runtime·free(), typ must be nil.". It seems that something will need to change
(if only the comment) once free goes away.
Issue 116390043: code review 116390043: runtime: get rid of free
(Closed)
Created 10 years, 9 months ago by dvyukov
Modified 10 years, 9 months ago
Reviewers: gobot
Base URL:
Comments: 2