Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add the experimental mem5.c memory allocator. Allocate the content part of cache pages separately from the header. (See check-ins (4495) and (4409)). (CVS 4789) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
669ece8c82bfa69add852589dd121175 |
User & Date: | drh 2008-02-14 23:26:56.000 |
Context
2008-02-14
| ||
23:44 | Fix a bug in EXPLAIN growing out of the new Mem implementation. (CVS 4790) (check-in: 4df62a55d6 user: drh tags: trunk) | |
23:26 | Add the experimental mem5.c memory allocator. Allocate the content part of cache pages separately from the header. (See check-ins (4495) and (4409)). (CVS 4789) (check-in: 669ece8c82 user: drh tags: trunk) | |
23:24 | Fix a typo in a comment used to generate documentation. (CVS 4788) (check-in: 65e66dd81c user: drh tags: trunk) | |
Changes
Changes to main.mk.
︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - - + + | TCCX = $(TCC) $(OPTS) -I. -I$(TOP)/src # Object files for the SQLite library. # LIBOBJ+= alter.o analyze.o attach.o auth.o btmutex.o btree.o build.o \ callback.o complete.o date.o delete.o \ expr.o fault.o func.o hash.o insert.o journal.o loadext.o \ |
︙ | |||
105 106 107 108 109 110 111 112 113 114 115 116 117 118 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | + | $(TOP)/src/loadext.c \ $(TOP)/src/main.c \ $(TOP)/src/malloc.c \ $(TOP)/src/mem1.c \ $(TOP)/src/mem2.c \ $(TOP)/src/mem3.c \ $(TOP)/src/mem4.c \ $(TOP)/src/mem5.c \ $(TOP)/src/mutex.c \ $(TOP)/src/mutex.h \ $(TOP)/src/mutex_os2.c \ $(TOP)/src/mutex_unix.c \ $(TOP)/src/mutex_w32.c \ $(TOP)/src/os.c \ $(TOP)/src/os.h \ |
︙ |
Changes to src/mem1.c.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + + - - - + - - - - - - - - - - - - - - | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains the C functions that implement a memory ** allocation subsystem for use by SQLite. ** |
︙ | |||
235 236 237 238 239 240 241 | 220 221 222 223 224 225 226 227 | - + | mem.mxUsed = mem.nowUsed; } } sqlite3_mutex_leave(mem.mutex); return (void*)p; } |
Changes to src/mem2.c.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + + - + - - + - - - - - - - - - - - - - - - - - - - - - - - + | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains the C functions that implement a memory ** allocation subsystem for use by SQLite. ** |
︙ | |||
473 474 475 476 477 478 479 | 451 452 453 454 455 456 457 458 | - + | for(i=0; i<NCSIZE; i++){ nTotal += mem.sizeCnt[i]; } return nTotal; } |
Changes to src/mem3.c.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + + - - - - + - - | ** use of malloc(). All dynamically allocatable memory is ** contained in a static array, mem.aPool[]. The size of this ** fixed memory pool is SQLITE_MEMORY_SIZE bytes. ** ** This version of the memory allocation subsystem is used if ** and only if SQLITE_MEMORY_SIZE is defined. ** |
︙ |
Changes to src/mem4.c.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + + - + - - - - - - | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains the C functions that implement a memory ** allocation subsystem for use by SQLite. ** |
︙ | |||
391 392 393 394 395 396 397 | 386 387 388 389 390 391 392 393 | - + | memsys4Free(pPrior); } assert( mem.mutex!=0 ); sqlite3_mutex_leave(mem.mutex); return (void*)p; } |
Added src/mem5.c.