SQLite
Check-in [3b7ec8d79e35e38df990e315c4ef9c7ab678bcbf]
Not logged in
Overview
SHA1 Hash:3b7ec8d79e35e38df990e315c4ef9c7ab678bcbf
Date: 2013-03-29 11:24:15
User: dan
Comment:Avoid assuming the page-size is 4096 bytes in os_unix.c.
Tags And Properties
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.