diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2023-01-18 19:59:48 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-01-18 20:13:36 +0100 |
commit | 7e332208a0987fd91bf1afc8fa7a5647b53a5670 (patch) | |
tree | 21ca3c7d6f1c5865ef2fa6f7dda24583f28f7eba /newlib/libc/ssp/stack_protector.c | |
parent | e18743072bc7fd56ec812e52dcfde5b686d1df8f (diff) | |
download | newlib-7e332208a0987fd91bf1afc8fa7a5647b53a5670.zip newlib-7e332208a0987fd91bf1afc8fa7a5647b53a5670.tar.gz newlib-7e332208a0987fd91bf1afc8fa7a5647b53a5670.tar.bz2 |
Cygwin: open_shared: always bump next_address
The new loop in open_shared has a subtil performance problem.
Next_address is bumped only if mapping at this address
failed. Every subsequent call to open_shared has a high probability
having to call MapViewOfFileEx twice, because next_address is still
set to the address of the last successful mapping.
Avoid this by bumping next_address every time.
While at it, fix a comment.
Fixes: dc0fe7742b8c ("Cygwin: open_shared: try harder allocating a shared region")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/ssp/stack_protector.c')
0 files changed, 0 insertions, 0 deletions