Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | New simplified memory initialization for MacOS. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
055b36f1c1593bb123f7319a07c47614 |
User & Date: | drh 2017-03-21 20:17:24.121 |
Context
2017-03-22
| ||
21:24 | Initial implementation of the json_mergepatch(A,B) SQL function. (check-in: a267444039 user: drh tags: json_mergepatch) | |
12:51 | Fix harmless compiler warnings in the shell. (check-in: a786829783 user: drh tags: trunk) | |
2017-03-21
| ||
20:17 | New simplified memory initialization for MacOS. (check-in: 055b36f1c1 user: drh tags: trunk) | |
18:56 | Fix an incorrect assert in the ANALYZE logic for STAT4 on WITHOUT ROWID tables. (check-in: ad741976c8 user: drh tags: trunk) | |
Changes
Changes to src/mem1.c.
︙ | ︙ | |||
234 235 236 237 238 239 240 241 242 243 | } /* ** Initialize this module. */ static int sqlite3MemInit(void *NotUsed){ #if defined(__APPLE__) && !defined(SQLITE_WITHOUT_ZONEMALLOC) if( _sqliteZone_ ){ return SQLITE_OK; } | > > < < < < < < < < < < < < < | | | | | | | | | < | | < < < < < < < | < < < | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | } /* ** Initialize this module. */ static int sqlite3MemInit(void *NotUsed){ #if defined(__APPLE__) && !defined(SQLITE_WITHOUT_ZONEMALLOC) int cpuCount; size_t len; if( _sqliteZone_ ){ return SQLITE_OK; } len = sizeof(cpuCount); /* One usually wants to use hw.acctivecpu for MT decisions, but not here */ sysctlbyname("hw.ncpu", &cpuCount, &len, NULL, 0); if( cpuCount>1 ){ /* defer MT decisions to system malloc */ _sqliteZone_ = malloc_default_zone(); }else{ /* only 1 core, use our own zone to contention over global locks, ** e.g. we have our own dedicated locks */ _sqliteZone_ = malloc_create_zone(4096, 0); malloc_set_zone_name(_sqliteZone_, "Sqlite_Heap"); } #endif /* defined(__APPLE__) && !defined(SQLITE_WITHOUT_ZONEMALLOC) */ UNUSED_PARAMETER(NotUsed); return SQLITE_OK; } /* ** Deinitialize this module. |
︙ | ︙ |