Audio and Game devs: Need to port my custom malloc and ring buffer code to get rid of those malloc pauses
JavaScript devs: Foolish audiophiles think they can hear when someone calls malloc!
Mis-diagnosing a problem doesn't mean there isn't a problem. If you call memcp in a way that calls malloc, and your app has been running a while or your system doesn't have a lot of free memory, you're going to get pauses while malloc looks for a free address block. If that pause takes too long, your audio buffer will stall and cause a harsh crackle. People will hear that differently, and explain the problem in different ways.
TL;DR: audio and game programming sucks, and if you allocate heap memory people will actually notice.
In the extreme:
Imagine my surprise when the customers chief software engineer said "Of course it leaks". He went on to point out that they had calculated the amount of memory the application would leak in the total possible flight time for the missile and then doubled that number. They added this much additional memory to the hardware to "support" the leaks.
memcpy wouldn't, but memmove would. memcpy doesn't check for or care about overlaps (and therefore the result is unpredictable - it'll depend on the implementation)
JavaScript devs: Foolish audiophiles think they can hear when someone calls malloc!
Mis-diagnosing a problem doesn't mean there isn't a problem. If you call memcp in a way that calls malloc, and your app has been running a while or your system doesn't have a lot of free memory, you're going to get pauses while malloc looks for a free address block. If that pause takes too long, your audio buffer will stall and cause a harsh crackle. People will hear that differently, and explain the problem in different ways.
TL;DR: audio and game programming sucks, and if you allocate heap memory people will actually notice.
In the extreme:
https://web.archive.org/web/20170504104857/https://groups.go...