Re: [go-nuts] Does recent bug in debug.FreeOSMemory also affect automatic background scavenging?

2020-03-11 Thread johnmrusk
Thanks Michael, That's super-helpful in helping us understand what to look for, and what not to look for. I can't easily get sufficient data to file an issue right now, because the behaviour has only been reported in a customer environment that I don't have access to. For that reason I can'

[go-nuts] Does recent bug in debug.FreeOSMemory also affect automatic background scavenging?

2020-03-11 Thread johnmrusk
I see this bug was recently fixed in FreeOSMemory: https://go-review.googlesource.com/c/go/+/208960/ Does the same bug also affect the scavenging that automatically happens every 5 minutes? Asking because we are seeing high memory usage, in an app that has (until now) avoided calling FreeOSMem

[go-nuts] Why not put contexts in structs?

2019-09-24 Thread johnmrusk
I've read the documentation recommended never to store a context in a struct. I'm curious to know why that's a bad thing. Is it just because context is request-scoped, and the struct may not be? Or is there more to it than that? In other words, what can go wrong if you store a context in a

[go-nuts] Why not put contexts in structs?

2019-09-24 Thread johnmrusk
I've read the documentation recommended never to store a context in a struct. I'm curious to know why that's a bad thing. Is it just because context is request-scoped, and the struct may not be? Or is there more to it than that? In other words, what can go wrong if you store a context in a

Re: [go-nuts] What's the max amount of RAM a Go program can allocate on 64-bit Windows?

2019-03-05 Thread johnmrusk
Thanks Andrey. On Wednesday, March 6, 2019 at 10:12:57 AM UTC+13, andrey mirtchovski wrote: > > There used to be a 512GB heap limit which was removed in Go 1.11. > Currently there should be no heap limit. For additional information > see: > > > https://github.com/golang/go/commit/2b415549b813ba

[go-nuts] What's the max amount of RAM a Go program can allocate on 64-bit Windows?

2019-03-05 Thread johnmrusk
I've seen various figures from older versions of 16 GB, 128 GB and (I think) 32 GB. What's the limit in recent versions of Go? John -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from i

Re: [go-nuts] lock for assigning to different elements of an array

2019-01-31 Thread johnmrusk
> > Writing to adjacent memory locations [i.e. different array elements, from > different goroutines] will cause false sharing between CPU caches. This is > a performance, not a correctness issue. > I'm looking to make an array of thread-safe counters - each counting a different thing. I pro

Re: [go-nuts] About 64bits alignment

2019-01-25 Thread johnmrusk
I still can't find anything "authoritative and unambiguous" on this. Therefore apps are going to be released with bugs in them. Can someone please say specifically when it is _not_ safe to use 64-bit atomic operations? When it is unsafe on a 64-bit OS? When it is unsafe on a 32-bit OS? John