I would like to know if scalable_malloc makes any guarantees about zero-initialized memory (for example: always zero-initialized up to requests for X bytes), whether or not this fact can be queried with the API (as in up to how many bytes this guarantee covers) and if it's going to stay like this in the future.
I need to guarantee zero-initialized memory for a project I'm working on, and it's a waste of precious CPU cycles to zero-initialize something if it's already zero-initialized.
Thanks in advance.
TBB Allocator has no any guarantees regarding zero-initialized memory returned by scalable_malloc. However, you can use scalable_calloc instead that is always returns zero-initialized memory.