Rémi Bernon : ntdll: Stop locking heap to access block-local data.
Module: wine Branch: master Commit: efc6a8f42c120beaeb747e69c38fc7914a1a40e6 URL: https://gitlab.winehq.org/wine/wine/-/commit/efc6a8f42c120beaeb747e69c38fc79... Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Nov 14 15:08:40 2022 +0100 ntdll: Stop locking heap to access block-local data. This moves unsafe_block_from_ptr calls outside of the heap lock. We assume here that concurrent call to another heap function on a block being freed is undefined, and it should then be safe to do so: * The block type or base offset never change after a block has been allocated and until it is freed. * Block flags such as BLOCK_FLAG_LARGE, or BLOCK_FLAG_USER_INFO also never change after a block has been allocated. * Other block flags are only read and modified inside the heap lock. --- dlls/ntdll/heap.c | 86 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 41 deletions(-)
participants (1)
-
Alexandre Julliard