This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, go]: Do not panic in test/nilptr.go


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]