On Wed, Feb 1, 2017 at 10:59 AM T L <tapir....@gmail.com> wrote: > It is obviously that both strings.Repeat and string([]byte(s)) make two 1M memory allocations.
The observation is correct. However, stack allocating of non-leaking items is capped in size and I guess 1M is out of limits. The specific constant is to be found somewhere in the runtime sources. -- -j -- 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.