1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

When possible, use memory mapping when appending new pages to a database file.

FossilOrigin-Name: 14135da3cdbafd699563a29608f32347cda28338
This commit is contained in:
dan
2013-03-20 14:26:59 +00:00
parent eecc398374
commit eb97b29345
8 changed files with 70 additions and 24 deletions

View File

@@ -140,8 +140,15 @@ int sqlite3OsShmMap(
DO_OS_MALLOC_TEST(id);
return id->pMethods->xShmMap(id, iPage, pgsz, bExtend, pp);
}
int sqlite3OsMremap(sqlite3_file *id, i64 iOff, i64 nOld, i64 nNew, void **pp){
return id->pMethods->xMremap(id, iOff, nOld, nNew, pp);
int sqlite3OsMremap(
sqlite3_file *id, /* Database file handle */
int flags, /* SQLITE_MREMAP_XXX flags */
i64 iOff, /* Offset at which mapping(s) start */
i64 nOld, /* Size of old mapping */
i64 nNew, /* Size of requested mapping */
void **pp /* IN/OUT: Pointer to mapped region */
){
return id->pMethods->xMremap(id, flags, iOff, nOld, nNew, pp);
}
/*