google / marl

A hybrid thread / fiber task scheduler written in C++ 11
Apache License 2.0
1.89k stars 193 forks source link

[Question] implemention of function alignedFree() #220

Closed snowzhaozhj closed 2 years ago

snowzhaozhj commented 2 years ago

https://github.com/google/marl/blob/166fc600772eb530749293446153e444eac4a993/src/memory.cpp#L195 I wonder why sizeof(size_t) is used here instead of sizeof(void*), even though the values of the two are equal on my computer.

ben-clayton commented 2 years ago

Hi @snowzhaozhj, While these are usually the same size, I agree, this just looks wrong. Thanks for spotting. I'll put a fix up shortly.