Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Back out the use of __sync_fetch_and_sub() as it does not appear to work. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | gnu-safe-math |
Files: | files | file ages | folders |
SHA1: |
4c2efd4239bf07eb4b92d4af54edd68e |
User & Date: | drh 2017-01-03 21:50:49.166 |
Context
2017-01-03
| ||
21:57 | Use compiler intrinsic functions for signed integer math when overflow detection is needed. (check-in: d3ac32a6e7 user: drh tags: trunk) | |
21:50 | Back out the use of __sync_fetch_and_sub() as it does not appear to work. (Closed-Leaf check-in: 4c2efd4239 user: drh tags: gnu-safe-math) | |
21:03 | Fix a typo in a comment. (check-in: ae087123db user: drh tags: gnu-safe-math) | |
18:05 | Use the GCC built-in __sync_fetch_and_sub() to make the sqlite3StatusDown() routine atomic, and thereby avoid some mutexing. (check-in: f69ce75b3d user: drh tags: gnu-safe-math) | |
Changes
Changes to src/malloc.c.
︙ | |||
372 373 374 375 376 377 378 | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | - - - - | }else{ /* Release memory back to the heap */ assert( sqlite3MemdebugHasType(p, MEMTYPE_SCRATCH) ); assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_SCRATCH) ); sqlite3MemdebugSetType(p, MEMTYPE_HEAP); if( sqlite3GlobalConfig.bMemstat ){ int iSize = sqlite3MallocSize(p); |
︙ | |||
440 441 442 443 444 445 446 | 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | - - - - | ** Free memory previously obtained from sqlite3Malloc(). */ void sqlite3_free(void *p){ if( p==0 ) return; /* IMP: R-49053-54554 */ assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) ); assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) ); if( sqlite3GlobalConfig.bMemstat ){ |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
232 233 234 235 236 237 238 | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | - - - - - - - - - | # define SQLITE_NOINLINE __attribute__((noinline)) #elif defined(_MSC_VER) && _MSC_VER>=1310 # define SQLITE_NOINLINE __declspec(noinline) #else # define SQLITE_NOINLINE #endif |
︙ |
Changes to src/status.c.
︙ | |||
96 97 98 99 100 101 102 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - - - - - + - | if( wsdStat.nowValue[op]>wsdStat.mxValue[op] ){ wsdStat.mxValue[op] = wsdStat.nowValue[op]; } } void sqlite3StatusDown(int op, int N){ wsdStatInit; assert( N>=0 ); |
︙ |