On Tue, Jan 16, 2018 at 4:49 AM Lynn H <yu3...@gmail.com> wrote: > not understand ur table, > when memsize is 256,single channel use 6114Byte memory?
Size of []byte is 3 words, assuming a 64 bit system that's 24 bytes. 256*24 = 6,144 bytes ie. size of a chan []byte with capacity 256, which is what make(chan []byte, 256) produces. In general, make(chan T, N) means reserve N*sizeof(T) bytes for the channel buffer. -- -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.