Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Another attempt to get reuse of excess opcode array space working correctly on all architectures and platforms. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
2f8583748abab1e15029d3a8693ba9a6 |
User & Date: | drh 2016-01-05 03:39:25.682 |
Context
2016-01-05
| ||
03:39 | Always use -DSQLITE_ENABLE_MEMSYS5 for fuzzcheck so that the --limit-mem option will work. (check-in: a855697719 user: drh tags: trunk) | |
03:39 | Another attempt to get reuse of excess opcode array space working correctly on all architectures and platforms. (check-in: 2f8583748a user: drh tags: trunk) | |
01:48 | Permit the 'test_fs' test module to be compiled and used on MinGW. (check-in: ac27f38eef user: mistachkin tags: trunk) | |
Changes
Changes to src/vdbeaux.c.
︙ | ︙ | |||
1847 1848 1849 1850 1851 1852 1853 | ** See also: allocateCursor(). */ nMem += nCursor; /* zCsr will initially point to nFree bytes of unused space at the ** end of the opcode array, p->aOp. The computation of nFree is ** conservative - it might be smaller than the true number of free | | | | > > | > | > > > < | 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 | ** See also: allocateCursor(). */ nMem += nCursor; /* zCsr will initially point to nFree bytes of unused space at the ** end of the opcode array, p->aOp. The computation of nFree is ** conservative - it might be smaller than the true number of free ** bytes, but never larger. nFree must be a multiple of 8 - it is ** rounded down if is not. */ n = ROUND8(sizeof(Op)*p->nOp); /* Bytes of opcode space used */ zCsr = &((u8*)p->aOp)[n]; /* Unused opcode space */ assert( EIGHT_BYTE_ALIGNMENT(zCsr) ); nFree = ROUNDDOWN8(pParse->szOpAlloc - n); /* Bytes of unused space */ assert( nFree>=0 ); if( nFree>0 ){ memset(zCsr, 0, nFree); assert( EIGHT_BYTE_ALIGNMENT(&zCsr[nFree]) ); } resolveP2Values(p, &nArg); p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort); if( pParse->explain && nMem<10 ){ nMem = 10; } p->expired = 0; /* Memory for registers, parameters, cursor, etc, is allocated in two ** passes. On the first pass, we try to reuse unused space at the ** end of the opcode array. If we are unable to satisfy all memory ** requirements by reusing the opcode array tail, then the second ** pass will fill in the rest using a fresh allocation. |
︙ | ︙ |