The allocation request (make) is made to the runtime which covers GC,
right? GC percent is also set to 10%.
After 1st call returns, my app has about 2gb ram allocated. When 2nd call
requests allocation, runtime cannot:
- first allocate another 2gb
- free the 1st buffer later
due to the definition of the GOGC (GC percent).
I think this is a GC bug.

2 May 2017 07:09 tarihinde "Sokolov Yura" <funny.fal...@gmail.com> yazdı:

> GC is triggered *after* allocation than crosses boundary. So your second
> allocation is actually tries to complete before first allocation freed. And
> Ubuntu with 4GB memory doesn't allow to allocate 4GB memory cause
> overcommit is not enabled by default.
>
> Use C/C++, or buy more memory, or change your datastructure from slice to
> slice of slice and allocate second dimension lazely, or call runtime.GC()
> explicitely between calls to f() (it will block until GC finishes).
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/golang-nuts/HrZpsyfb3i0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to