This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, go]: Do not panic in test/nilptr.go
- From: Ian Lance Taylor <iant at google dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Wed, 01 Feb 2012 13:27:16 -0800
- Subject: Re: [PATCH, go]: Do not panic in test/nilptr.go
- References: <CAFULd4Y2HL373SCnob9Ppd0A7ezPzQ1Xku=TgjNjSPw==j-GWA@mail.gmail.com> <mcrobtjhdf2.fsf@dhcp-172-18-216-180.mtv.corp.google.com> <CAFULd4akD1Ba4FJ2-Kvvdt4Rwwdmj-Kspge-tKvBWgHwSPWj6A@mail.gmail.com>
Uros Bizjak <ubizjak@gmail.com> writes:
> Attached is the patch I have committed.
Thanks for taking care of that.
> (BTW: Do you have any idea on what to do with excessive memory usage
> in chan/select2.go? )
At this point I don't. It's sort of peculiar. Sending an int on a
channel should not use any memory. The test is careful to only measure
the memory allocated for sending and receiving, and as far as I can see
nothing else should be allocated during the test. You reported that the
test was allocating 2098576 bytes. When I run it I see it allocating
1408 bytes on x86_64, 640 bytes on i386. 2098576 is much larger than
either number. What is allocating that memory?
In other words, there appears to be a real bug here. You can probably
track it down by setting a breakpoint on runtime_mallocgc after the line
runtime.MemStats.Alloc = 0
What is calling runtime_mallocgc?
Ian