<pre class="notranslate">Change cadcd534d525 broke the freebsd-amd64 build:
<a href="http://godashboard.appspot.com/log/86327d8b97ad440e9c7edcb115129297adf10d52fbad21ef1aa9d0a8f29f7210" rel="nofollow">http://godashboard.appspot.com/log/86327d8b97ad440e9c7edcb115129297adf10d52fbad21ef1aa9d0a8f29f7210</a>


gopack grc _test/http.a _gotest_.6 
2011/04/06 07:13:54 http: invalid Content-Length of "intentional gibberish"
sent
--- FAIL: http_test.Test304Responses (0.00 seconds)
    expected no TransferEncoding; got [chunked]
    got unexpected body "127.0.0.1:32341"
FAIL
gotest: "./6.out -test.short=true -test.timeout=120" failed: exit status 1


Except that test never such a reply, suggesting the Get(ts.URL) in that test is re-using
the DefaultTransport and getting a response from the wrong server.  :(</pre>
<p dir="auto">by <strong>zhaihj233</strong>:</p>
<pre class="notranslate">var base int64 = int64(header.IndexLength + 0x01)
    for i := 0; i &lt; int(header.Length); i++ {
        mbuffer := make([]byte, indexs[i].length)
        f.ReadAt(mbuffer, int64(indexs[i].offset)+base)
    }

In this example, f is *os.File which point to a localfile. "indexs" is an
index array which records offset and length of the data in f.

What is the expected output?

mbuffer should be collected by GC. 

What do you see instead?

Memory usage continues raising, even adding runtime.GC() can not do any help

Which compiler are you using (5g, 6g, 8g, gccgo)?

8g

Which operating system are you using?

Windows 7 x64

Which version are you using?  (run 'go version')

GO VER 1.0.2

Please provide any additional information below.

When compiling the same program with 6g, everything seems to be fine.</pre>