/ Check-in [3b7ec8d7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Avoid assuming the page-size is 4096 bytes in os_unix.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | two-mappings
Files: files | file ages | folders
SHA1:3b7ec8d79e35e38df990e315c4ef9c7ab678bcbf
User & Date: dan 2013-03-29 11:24:15
Context
2013-03-29
18:52
Fix a problem in btree.c that could cause a crash following an OOM. Also various test script problems. check-in: e8bcdf93 user: dan tags: two-mappings
11:24
Avoid assuming the page-size is 4096 bytes in os_unix.c. check-in: 3b7ec8d7 user: dan tags: two-mappings
2013-03-27
19:53
Modify various test cases so that they work if the file is extended in units of the system page-size. check-in: 0e3d5119 user: dan tags: two-mappings
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

4560
4561
4562
4563
4564
4565
4566

4567





4568
4569
4570
4571
4572
4573
4574
  }
}

/*
** Return the system page size somehow.
*/
static int unixGetPagesize(void){

  return 4096;





}

/*
** Memory map or remap the file opened by file-descriptor pFd (if the file
** is already mapped, the existing mapping is replaced by the new). Or, if 
** there already exists a mapping for this file, and there are still 
** outstanding xFetch() references to it, this function is a no-op.







>
|
>
>
>
>
>







4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
  }
}

/*
** Return the system page size somehow.
*/
static int unixGetPagesize(void){
#if HAVE_REMAP
  return 512;
#elif _BSD_SOURCE
  return getpagesize();
#else
  return (int)sysconf(_SC_PAGESIZE);
#endif
}

/*
** Memory map or remap the file opened by file-descriptor pFd (if the file
** is already mapped, the existing mapping is replaced by the new). Or, if 
** there already exists a mapping for this file, and there are still 
** outstanding xFetch() references to it, this function is a no-op.