when working on the profiling i noticed, not for the first time, that getpid calls memset to clear the whole buffer, but only the first byte needs to be cleared, which can easily be done directly.