]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: smallprint.cc: Convert tmpbuf to lockless
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 22 Aug 2022 10:01:15 +0000 (12:01 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 22 Aug 2022 10:01:15 +0000 (12:01 +0200)
commit07ec40170a32cc614818ec8fa13cacef0a8252a0
tree1b26e74ed9338d738f24bf9140f960ddb9ec92ff
parent1b3a0effd40a0d75887ee9d2909dd4e8c5f20d37
Cygwin: smallprint.cc: Convert tmpbuf to lockless

The old technique was from a time when we had to reduce stack pressure
by moving 64K buffers elsewhere.  It was implemented using a static
global buffer, guarded by a muto. However, that adds a lock which may
unnecessarily serialize threads.

Use Windows heap buffers per invocation instead.  HeapAlloc/HeapFree are
pretty fast, scale nicely in multithreaded scenarios and don't serialize
threads unnecessarily.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/smallprint.cc
This page took 0.029748 seconds and 5 git commands to generate.