Skip to content

Commit 0b689c1

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fix bug #77930: Remove mmap limit
2 parents 7816df2 + 333d607 commit 0b689c1

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

main/streams/mmap.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t le
2727
range.mode = mode;
2828
range.mapped = NULL;
2929

30-
/* For now, we impose an arbitrary limit to avoid
31-
* runaway swapping when large files are passed through. */
32-
if (length > 4 * 1024 * 1024) {
33-
return NULL;
34-
}
35-
3630
if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_MMAP_API, PHP_STREAM_MMAP_MAP_RANGE, &range)) {
3731
if (mapped_len) {
3832
*mapped_len = range.length;

0 commit comments

Comments
 (0)