The Case of the Phantom Allocations šŸ‘»

here it should be buffer and not buf (I think). Then buf is just some non-constant global variable you defined outside the function, and that is allocating.

2 Likes