SQLite Forum

Is it possible to use WAL mode without using mmap() function ?
Login

Is it possible to use WAL mode without using mmap() function ?

(1) By anonymous on 2021-11-30 09:10:02 [link] [source]

Hello,

I saw the WAL mode can work without shared memory as long as the database is opened in exclusive locking mode. However, the SQLite code shows that it still link the mmap() function even the SQLITE_MAX_MMAP_SIZE is set to zero

#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 { "mmap", (sqlite3_syscall_ptr)mmap, 0 },

#else { "mmap", (sqlite3_syscall_ptr)0, 0 },

#endif

It looks I have to omit WAL in order to remove the dependency to the mmap() function.

My question is how to use WAL but without linking mmap() function, is it possible ?

(2) By anonymous on 2022-01-24 16:58:02 in reply to 1 [link] [source]

Anyone can help?

(3) By anonymous on 2022-01-24 17:06:20 in reply to 1 [source]

I want to use WAL mode in vxworks kernel mode. So, it is not necessary to use mmap to share memory among processes. All heap memory are visible by kernel. In this case, is it also possible to not force WAL to work in exclusive mode? Do I need to customize the VFS to accomplish this?