Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread advancenOO
OK, I know it is not safe when use mmap in Android 7 fuse. And do you mean the bug is in fuse kernel framework as you mentioned Android FUSE filesystem driver? Which corresponding to Linux 3.10? By the way, do you have any possible repro steps especially in Android Sqlite? -- Sent from:

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread advancenOO
Yeah. Thanks for your suggestion about -DSQLITE_ENABLE_BATCH_ATOMIC_WRITE. But the version of my sqlite is 3.16.2, so I guess I may use it at a later time int the future. -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread advancenOO
Thanks for the notification about the bugs in MacOS. So the most important reason for disable SQLITE_MMAP_READWRITE is the bugs in OS, not the stray pointer in upper applications. Is it right? -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread Howard Chu
J Decker wrote: On Tue, Dec 12, 2017 at 4:35 PM, Howard Chu wrote: Martin Raiber wrote: On 12.12.2017 19:47 Simon Slavin wrote: On 12 Dec 2017, at 6:27pm, Jens Alfke wrote: On Dec 12, 2017, at 5:46 AM, Simon Slavin wrote:

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread J Decker
On Tue, Dec 12, 2017 at 4:35 PM, Howard Chu wrote: > Martin Raiber wrote: > >> On 12.12.2017 19:47 Simon Slavin wrote: >> >>> On 12 Dec 2017, at 6:27pm, Jens Alfke wrote: >>> >>> On Dec 12, 2017, at 5:46 AM, Simon Slavin wrote:

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread Howard Chu
Martin Raiber wrote: On 12.12.2017 19:47 Simon Slavin wrote: On 12 Dec 2017, at 6:27pm, Jens Alfke wrote: On Dec 12, 2017, at 5:46 AM, Simon Slavin wrote: Before you answer that question, you should know that both Windows and macOS have been

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread Howard Chu
Jens Alfke wrote: I’m skeptical about mmap being broken on Macs, since there are other production databases such as Realm* that use it heavily. (Though I am not sure whether Realm uses writeable mappings.) —Jens * and LMDB, but I am not sure if LMDB is in use on macOS. LMDB is in common

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread Jens Alfke
> On Dec 12, 2017, at 10:47 AM, Simon Slavin wrote: > > See this thread: > > >

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread Martin Raiber
On 12.12.2017 19:47 Simon Slavin wrote: > On 12 Dec 2017, at 6:27pm, Jens Alfke wrote: > >> On Dec 12, 2017, at 5:46 AM, Simon Slavin wrote: >>> Before you answer that question, you should know that both Windows and >>> macOS have been proved to have

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread Simon Slavin
On 12 Dec 2017, at 6:27pm, Jens Alfke wrote: > On Dec 12, 2017, at 5:46 AM, Simon Slavin wrote: >> Before you answer that question, you should know that both Windows and macOS >> have been proved to have serious bugs in their memory mapping code. >

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread Jens Alfke
> On Dec 12, 2017, at 5:46 AM, Simon Slavin wrote: > > The stray pointer or array overrun is not in the SQLite code. It’s in the > implementation of memory mapping built into the OS. So you need to ask > yourself whether you trust your OS. This argument (which is a

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread Richard Hipp
On 12/12/17, advancenOO wrote: > Um, stray pointer or array overrun in upper applications will be treated as > BUG in my system. And I believe all these bugs could be fixed before using > sqlite. You have a very optimistic view of application software :-) Look - if

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread Simon Slavin
On 12 Dec 2017, at 1:32pm, advancenOO wrote: > Um, stray pointer or array overrun in upper applications will be treated as > BUG in my system. And I believe all these bugs could be fixed before using > sqlite. > So can I safely enable SQLITE_MMAP_READWRITE directly

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread advancenOO
I am a developer of system, not application. So I have nothing to do with the SQL or indices even though I know these may cut orders of magnitude from execution times. And that is why I use speedtest1.c of Sqlite to evaluate the performance of my system. -- Sent from:

Re: [sqlite] Enabling MMAP in Android

2017-12-12 Thread advancenOO
Um, stray pointer or array overrun in upper applications will be treated as BUG in my system. And I believe all these bugs could be fixed before using sqlite. So can I safely enable SQLITE_MMAP_READWRITE directly if I can ignore the possibility of the BUG? But I notice that Sqlite may not call

Re: [sqlite] Enabling MMAP in Android

2017-12-11 Thread Richard Hipp
On 12/11/17, advancenOO wrote: > > At the same time, Mmap() is only used for reading by default, not writing. > But why? If the database is memory-mapped writable, then a stray pointer or array overrun in the application (NB: not in SQLite - in the application that

Re: [sqlite] Enabling MMAP in Android

2017-12-11 Thread Graham Holden
have been exhausted should you be looking at compile options. Graham. Sent from my Samsung Galaxy S7 - powered by Three Original message From: advancenOO <haveagoodtime2...@gmail.com> Date: 11/12/2017 14:04 (GMT+00:00) To: sqlite-users@mailinglists.sqlite.org Subject: [sqlit

[sqlite] Enabling MMAP in Android

2017-12-11 Thread advancenOO
I find MMAP is able to be used for db files(getPageMMap()) but is not enabled by default. I wonder if it is recommended to use MMAP in Android? As I think MMAP is one way to improve the speed performance(I use speedtest1.c to evaluate). At the same time, Mmap() is only used for reading by