Fossil

Check-in [5447bc90]
Login

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

Overview
Comment:Merge updates from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | withMman
Files: files | file ages | folders
SHA3-256:5447bc90282ca2b0e93f51bb5b04be23031b5c61b2a7ab4cb88842bc4c3fe4b7
User & Date: mistachkin 2018-03-17 22:33:39
Context
2018-03-20
17:10
Support for using 'sys/mman.h' when compiling for POSIX. check-in: d5ca5384 user: mistachkin tags: trunk
2018-03-17
22:33
Merge updates from trunk. Closed-Leaf check-in: 5447bc90 user: mistachkin tags: withMman
22:32
Fix harmless compiler warning. check-in: e2a90ed5 user: mistachkin tags: trunk
21:24
Report the detected memory page size in the verbose version information. check-in: a6a2d861 user: mistachkin tags: withMman
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
  int bVerbose                /* Non-zero for full information. */
){
#if defined(FOSSIL_ENABLE_TCL)
  int rc;
  const char *zRc;
#endif
  Stmt q;
  size_t pageSize;
  blob_zero(pOut);
  blob_appendf(pOut, "This is fossil version %s\n", get_version());
  if( !bVerbose ) return;
  blob_appendf(pOut, "Compiled on %s %s using %s (%d-bit)\n",
               __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
  blob_appendf(pOut, "Schema version %s\n", AUX_SCHEMA_MAX);
  fossil_get_page_size(&pageSize);







|







918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
  int bVerbose                /* Non-zero for full information. */
){
#if defined(FOSSIL_ENABLE_TCL)
  int rc;
  const char *zRc;
#endif
  Stmt q;
  size_t pageSize = 0;
  blob_zero(pOut);
  blob_appendf(pOut, "This is fossil version %s\n", get_version());
  if( !bVerbose ) return;
  blob_appendf(pOut, "Compiled on %s %s using %s (%d-bit)\n",
               __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
  blob_appendf(pOut, "Schema version %s\n", AUX_SCHEMA_MAX);
  fossil_get_page_size(&pageSize);

Changes to src/util.c.

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
  *piPageSize = (size_t)sysconf(_SC_PAGE_SIZE);
#else
  *piPageSize = 4096; /* FIXME: What for POSIX? */
#endif
}
void *fossil_secure_alloc_page(size_t *pN){
  void *p;
  size_t pageSize;

  fossil_get_page_size(&pageSize);
  assert( pageSize>0 );
  assert( pageSize%2==0 );
#if defined(_WIN32)
  p = VirtualAlloc(NULL, pageSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
  if( p==NULL ){







|







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
  *piPageSize = (size_t)sysconf(_SC_PAGE_SIZE);
#else
  *piPageSize = 4096; /* FIXME: What for POSIX? */
#endif
}
void *fossil_secure_alloc_page(size_t *pN){
  void *p;
  size_t pageSize = 0;

  fossil_get_page_size(&pageSize);
  assert( pageSize>0 );
  assert( pageSize%2==0 );
#if defined(_WIN32)
  p = VirtualAlloc(NULL, pageSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
  if( p==NULL ){