mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
parent
d5f76caf6c
commit
ccc95bf9df
@ -205,14 +205,19 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
|
||||
err = GetLastError();
|
||||
if (ret == ALLOC_FAIL_MAPPING) {
|
||||
/* Mapping failed, wait for mapping object to get freed and retry */
|
||||
CloseHandle(memfile);
|
||||
CloseHandle(memfile);
|
||||
memfile = NULL;
|
||||
if (++map_retries >= MAX_MAP_RETRIES) {
|
||||
break;
|
||||
}
|
||||
zend_shared_alloc_unlock_win32();
|
||||
Sleep(1000 * (map_retries + 1));
|
||||
zend_shared_alloc_lock_win32();
|
||||
} else {
|
||||
zend_shared_alloc_unlock_win32();
|
||||
return ret;
|
||||
}
|
||||
} while (++map_retries < MAX_MAP_RETRIES);
|
||||
} while (1);
|
||||
|
||||
if (map_retries == MAX_MAP_RETRIES) {
|
||||
zend_shared_alloc_unlock_win32();
|
||||
|
Loading…
Reference in New Issue
Block a user