xhawk18 / s_task

awaitable coroutine library for C
Other
594 stars 87 forks source link

s_chan_declare 数据段大小问题? #3

Open heng30 opened 3 years ago

heng30 commented 3 years ago

源码 : #define s_chan_declare(name,TYPE,count) \ s_chan_t name[1 + ((count)*sizeof(TYPE) + sizeof(s_chan_t) - 1) / sizeof(sizeof(s_chan_t))]

不懂为什么是除以sizeof(sizeof(s_chan_t)), 而不是除以sizeof(s_chan_t)

xhawk18 commented 3 years ago

笔误,这么算多分配了。已提交修正 thank you!