mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2024-12-15 13:19:46 +00:00
59868b5cf1
credits to @bavison for the MAP_POPULATE patch
23 lines
782 B
Diff
23 lines
782 B
Diff
diff --git a/sqlite3.c b/sqlite3.c
|
|
index d0057a6..63b80c7 100644
|
|
--- a/sqlite3.c
|
|
+++ b/sqlite3.c
|
|
@@ -28278,7 +28278,7 @@ static void unixRemapfile(
|
|
pNew = osMremap(pOrig, nReuse, nNew, MREMAP_MAYMOVE);
|
|
zErr = "mremap";
|
|
#else
|
|
- pNew = osMmap(pReq, nNew-nReuse, flags, MAP_SHARED, h, nReuse);
|
|
+ pNew = osMmap(pReq, nNew-nReuse, flags, MAP_SHARED | MAP_POPULATE, h, nReuse);
|
|
if( pNew!=MAP_FAILED ){
|
|
if( pNew!=pReq ){
|
|
osMunmap(pNew, nNew - nReuse);
|
|
@@ -28297,7 +28297,7 @@ static void unixRemapfile(
|
|
|
|
/* If pNew is still NULL, try to create an entirely new mapping. */
|
|
if( pNew==0 ){
|
|
- pNew = osMmap(0, nNew, flags, MAP_SHARED, h, 0);
|
|
+ pNew = osMmap(0, nNew, flags, MAP_SHARED | MAP_POPULATE, h, 0);
|
|
}
|
|
|
|
if( pNew==MAP_FAILED ){
|