8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5f76ca commit ccc95bfCopy full SHA for ccc95bf
ext/opcache/shared_alloc_win32.c
@@ -205,14 +205,19 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
205
err = GetLastError();
206
if (ret == ALLOC_FAIL_MAPPING) {
207
/* Mapping failed, wait for mapping object to get freed and retry */
208
- CloseHandle(memfile);
+ CloseHandle(memfile);
209
memfile = NULL;
210
+ if (++map_retries >= MAX_MAP_RETRIES) {
211
+ break;
212
+ }
213
+ zend_shared_alloc_unlock_win32();
214
Sleep(1000 * (map_retries + 1));
215
+ zend_shared_alloc_lock_win32();
216
} else {
217
zend_shared_alloc_unlock_win32();
218
return ret;
219
}
- } while (++map_retries < MAX_MAP_RETRIES);
220
+ } while (1);
221
222
if (map_retries == MAX_MAP_RETRIES) {
223