Lines Matching full:allocation
388 ** specify which memory allocation subsystem to use.
1731 ** performed by these routines include allocation or deallocation
1806 ** CAPI3REF: Memory Allocation Routines
1809 ** and low-level memory allocation routines.
1818 ** memory allocation subsystem for SQLite to use for all of its
1824 ** with specialized memory allocation requirements. This object is
1835 ** xSize should return the allocated size of a memory allocation
1840 ** a memory allocation given a particular requested size. Most memory
1843 ** Every memory allocation request coming in through [sqlite3_malloc()]
1845 ** that causes the corresponding memory allocation to fail.
1870 void *(*xMalloc)(int); /* Memory allocation function */
1871 void (*xFree)(void*); /* Free a prior allocation */
1872 void *(*xRealloc)(void*,int); /* Resize an allocation */
1873 int (*xSize)(void*); /* Return the size of an allocation */
1874 int (*xRoundup)(int); /* Round up request size to allocation size */
1939 ** alternative low-level memory allocation routines to be used in place of
1940 ** the memory allocation routines built into SQLite.)^ ^SQLite makes
1947 ** structure is filled with the currently defined memory allocation routines.)^
1948 ** This option can be used to overload the default memory allocation
1949 ** routines with a wrapper that simulations memory allocation failure or
1954 ** boolean, which enables or disables the collection of memory allocation
1955 ** statistics. ^(When memory allocation statistics are disabled, the
1963 ** ^Memory allocation statistics are enabled by default unless SQLite is
1965 ** allocation statistics are disabled by default.
1972 ** drawn, the size of each scratch allocation (sz),
1996 ** argument should point to an allocation of at least sz*N bytes of memory.
2007 ** for all of its dynamic memory allocation needs beyond those provided
2010 ** the number of bytes in the memory buffer, and the minimum allocation size.
2016 ** allocator is engaged to handle all of SQLites memory allocation needs.
2019 ** The minimum allocation size is capped at 2**12. Reasonable values
2020 ** for the minimum allocation size are 2**5 through 2**8.</dd>
2039 ** This option can be used to overload the default mutex allocation
2049 ** memory allocation for the lookaside memory allocator on each
2381 ** memory allocation fails, then SQLITE_NOMEM is returned.
2669 ** CAPI3REF: Memory Allocation Subsystem
2672 ** internal memory allocation needs. "Core" in the previous sentence
2695 ** prior memory allocation to be at least N bytes, where N is the
2696 ** second parameter. The memory allocation to be resized is the first
2703 ** ^sqlite3_realloc() returns a pointer to a memory allocation
2705 ** ^If M is the size of the prior allocation, then min(N,M) bytes
2706 ** of the prior allocation are copied into the beginning of buffer returned
2707 ** by sqlite3_realloc() and the prior allocation is freed.
2708 ** ^If sqlite3_realloc() returns NULL, then the prior allocation
2725 ** installation. Memory allocation errors are detected, but
2747 ** routines, which form the built-in memory allocation subsystem.
3885 ** NULL. ^These routine might also return NULL if a memory allocation error
4230 ** ^(If a memory allocation error occurs during the evaluation of any
4536 ** allocation.)^
4691 ** indicating that a memory allocation failed.
5275 ** the soft heap limit is enforced on every memory allocation. Without
6168 ** ^xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
6170 ** allocation for a static mutex. ^However xMutexAlloc() may use SQLite
6171 ** memory allocation for a fast or recursive mutex.
6386 ** this parameter. The amount returned is the sum of the allocation
6390 ** <dd>This parameter records the largest memory allocation request
6409 ** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE]
6417 ** <dd>This parameter records the largest memory allocation request
6426 ** in bytes. Since a single thread may only have one scratch allocation
6432 ** allocation which could not be satisfied by the [SQLITE_CONFIG_SCRATCH]
6434 ** returned include overflows because the requested allocation was too
6435 ** larger (that is, because the requested allocation was larger than the
6441 ** <dd>This parameter records the largest memory allocation request
9667 ** to satisfy small transient memory allocation requests for objects
9674 ** lookaside malloc subsystem. Each available memory allocation in
10531 ** ALLOCATION NOTES:
10536 ** two or more Expr objects will be stored in a single memory allocation,
10542 ** are contained within the same memory allocation. Note, however, that
11309 char *zBase; /* A base allocation. Not from malloc. */
11314 u8 mallocFailed; /* Becomes true if any memory allocation fails */
11343 sqlite3_mem_methods m; /* Low-level memory allocation interface */
12146 ** sqlite3MemdebugSetType() sets the "type" of an allocation to one of
12158 ** and MEMTYPE_LOOKASIDE. If an allocation is MEMTYPE_LOOKASIDE, that means
12159 ** it might have been allocated by lookaside, except the allocation was
15129 ** This file contains a no-op memory allocation drivers for use when
15130 ** SQLITE_ZERO_MALLOC is defined. The allocation drivers implemented
15144 ** No-op versions of all memory allocation routines
15157 ** Populate the low-level memory allocation function pointers in
15190 ** This file contains low-level memory allocation drivers for when
15194 ** This file contains implementations of the low-level memory allocation
15199 ** default configuration is to use memory allocation routines in this
15279 ** Like malloc(), but remember the size of the allocation
15346 ** Like realloc(). Resize an allocation previously obtained from
15385 ** Round up a request size to the next valid allocation size.
15438 ** Populate the low-level memory allocation function pointers in
15471 ** This file contains low-level memory allocation drivers for when
15474 ** information to each allocation in order to help detect and fix memory
15477 ** This file contains implementations of the low-level memory allocation
15500 ** Each memory allocation looks like this:
15503 ** | Title | backtrace pointers | MemBlockHdr | allocation | EndGuard |
15506 ** The application code sees only a pointer to the allocation. We have
15507 ** to back up from the allocation pointer to find the MemBlockHdr. The
15508 ** MemBlockHdr tells us the size of the allocation and the number of
15513 i64 iSize; /* Size of this allocation */
15518 u8 eType; /* Allocation type code */
15542 ** Mutex to control access to the memory allocation subsystem.
15568 int disallow; /* Do not allow memory allocation */
15572 ** nAlloc[i] is the number of allocation attempts of i*8
15573 ** bytes. i==NCSIZE is the number of allocation attempts for
15604 ** Given an allocation, find the MemBlockHdr for that allocation.
15606 ** This routine checks the guards at either end of the allocation and
15643 ** Initialize the memory allocation subsystem.
15657 ** Deinitialize the memory allocation subsystem.
15665 ** Round up a request size to the next valid allocation size.
15673 ** the content of a new memory allocation to unpredictable values and
15674 ** to clear the content of a freed allocation to unpredictable values.
15792 ** Change the size of an existing memory allocation.
15795 ** allocation into a new place in memory. In this way, if the
15796 ** higher level code is using pointer to the old allocation, it is
15818 ** Populate the low-level memory allocation function pointers in
15836 ** Set the "type" of an allocation.
15849 ** allocation p. Also return true if p==NULL.
15852 ** verify the type of an allocation. For example:
15861 assert( pHdr->iForeGuard==FOREGUARD ); /* Allocation is valid */
15871 ** allocation p. Also return true if p==NULL.
15874 ** verify the type of an allocation. For example:
15883 assert( pHdr->iForeGuard==FOREGUARD ); /* Allocation is valid */
15892 ** Set the number of backtrace levels kept for each allocation.
16001 ** allocation subsystem for use by SQLite.
16003 ** This version of the memory allocation subsystem omits all
16011 ** This version of the memory allocation subsystem is included
16036 ** A memory allocation (also called a "chunk") consists of two or
16042 ** size of the allocation in blocks if the allocation is free.
16089 ** Memory available for allocation. nPool is the size of the array
16101 ** Mutex to control access to the memory allocation subsystem.
16220 ** Called when we are unable to satisfy an allocation of nBytes.
16254 ** Return a pointer to the new allocation. Or, if the master chunk
16377 ** Try to satisfy the allocation by carving a piece off of the end
16388 ** Then try again to satisfy the allocation by carving a piece off
16418 ** Free an outstanding memory allocation.
16460 ** Return the size of an outstanding allocation, in bytes. The
16473 ** Round up a request size to the next valid allocation size.
16506 ** Change the size of an existing memory allocation
16653 ** Populate the low-level memory allocation function pointers in
16690 ** allocation subsystem for use by SQLite.
16692 ** This version of the memory allocation subsystem omits all
16700 ** This version of the memory allocation subsystem is included
16713 ** Concerning Dynamic Storage Allocation". Journal of the Association for
16716 ** Let n be the size of the largest allocation divided by the minimum
16717 ** allocation size (after rounding all sizes up to a power of 2.) Let M
16719 ** N be the total amount of memory available for allocation. Robson
16736 ** A minimum allocation is an instance of the following structure.
16750 ** Maximum size of any allocation is ((1<<LOGMAX)*mem5.szAtom). Since
16770 ** Memory available for allocation
16772 int szAtom; /* Smallest possible allocation in bytes */
16777 ** Mutex to control access to the memory allocation subsystem.
16791 u32 maxRequest; /* Largest allocation (exclusive of internal frag) */
16874 ** Return the size of an outstanding allocation, in bytes. The
16920 int iFullSz; /* Size of allocation rounded up to power of 2 */
16926 /* Keep track of the maximum allocation request. Even unfulfilled
16932 /* Abort if the requested allocation size is larger than the largest
16977 ** Free an outstanding memory allocation.
17059 ** Change the size of an existing memory allocation.
17066 ** of two. If nBytes==0 that means that an oversize allocation
17067 ** (an allocation larger than 0x40000000) was requested and this
17094 ** Round up a request size to the next valid allocation size. If
17095 ** the allocation is too large to be handled by this allocation system,
17099 ** 32-bit signed integer. Hence the largest allocation is 0x40000000
17135 int nMinLog; /* Log base 2 of minimum allocation size in bytes */
18599 ** Memory allocation functions used throughout sqlite.
18629 ** State information local to the memory allocation subsystem.
18646 ** (so that a range test can be used to determine if an allocation
18665 ** total memory allocation is about to exceed the soft heap
18740 ** Initialize the memory allocation subsystem.
18791 ** Deinitialize the memory allocation subsystem.
18844 ** Do a memory allocation with statistics and alarms. Assume the
18887 /* A memory allocation of a number of bytes which is near the maximum
18905 ** This version of the memory allocation is for use by the application.
18907 ** allocation.
18917 ** Each thread may only have a single outstanding allocation from
18919 allocation
18920 ** is outstanding clearing it when the allocation is freed.
18977 /* Verify that no more than two scratch allocation per thread
18986 /* Release memory from the SQLITE_CONFIG_SCRATCH allocation */
19017 ** TRUE if p is a lookaside memory allocation from db
19028 ** Return the size of a memory allocation previously obtained from
19093 ** Change the size of an existing memory allocation
19167 ** Allocate and zero memory. If the allocation fails, make
19179 ** Allocate and zero memory. If the allocation fails, make
20828 ** The allocation (static, dynamic etc.) and encoding of the Mem may be
20921 ** NULL is returned if there is an allocation error.
22348 ** allocation as a benign.
22694 ** A Note About Memory Allocation:
25841 ** If a memory allocation error occurs, return NULL.
31396 ** *pConchPath is set to NULL if a memory allocation error occurs.
31798 ** single thread. The memory allocation and mutex subsystems have not
32884 ** Change the size of an existing memory allocation
32912 ** Return the size of an outstanding allocation, in bytes.
32936 ** Round up a request size to the next valid allocation size.
32995 ** Populate the low-level memory allocation function pointers in
34346 ** on allocation size granularity boundaries.
35796 /* get memory map allocation granularity */
36143 ** If a memory allocation error occurs, return -1.
36997 /******** Page Allocation/SQLITE_CONFIG_PCACHE Related Functions **************/
37002 ** verb to sqlite3_config(). Parameter pBuf points to an allocation large
37100 ** Return the size of a pcache allocation
37200 ** allocation onto the heap.
37902 ** allocated in chunks so most INSERTs do no allocation. There is an
37930 ** Target size for allocation chunks.
37935 ** The number of rowset entries per allocation chunk.
37951 ** following structure) to reduce memory allocation overhead. The
37987 ** allocation of entries available to be filled.
38028 ** memory allocation fails.
40519 ** allocated by this function. If this is the case and an allocation fails,
40778 ** function allocates memory by calling sqlite3Malloc(). If an allocation
41905 ** to obtain a new Pager.pTmpSpace buffer. If this allocation attempt
41911 ** function was called, or because the memory allocation attempt failed,
44575 ** If a memory allocation fails, SQLITE_NOMEM is returned. If an error
44591 ** if the allocation fails. Otherwise, zero the new portion in case a
44654 ** This function may return SQLITE_NOMEM if a memory allocation fails,
49080 int mallocFailed; /* A memory allocation error has occurred */
50510 ** allocation. This routine might need to defragment in order to bring
50513 ** allocation is being made in order to insert a new cell, so we will
50550 ** the request. The allocation is made from the first free slot in
50573 ** for the portion used by the new allocation. */
50583 ** the allocation. If not, defragment.
50597 ** is no way that the allocation can extend off the end of the page.
51368 ** Make sure pBt->pTmpSpace points to an allocation of
51378 ** Free the pBt->pTmpSpace allocation
57282 ** allocation errors, an error message held in memory obtained from
57284 ** returned. If a memory allocation error occurs, NULL is returned.
57480 ** xFree argument when the memory allocation was made is invoked on the
57807 /* If the allocation succeeded, populate the new object. */
58413 ** Make sure pMem->z points to a writable allocation of at least
59033 ** size limit) then no memory allocation occurs. If the string can be
59034 ** stored without allocating memory, then it is. If a memory allocation
60209 ** caller should not free the allocation, it will be freed when the Vdbe is
60324 ** If a memory allocation error has occurred prior to the calling of this
60901 int *pnByte /* If allocation cannot be made, increment *pnByte */
60984 u8 *zCsr; /* Memory available for allocation */
61015 zCsr = (u8*)&p->aOp[p->nOp]; /* Memory avaliable for allocation */
61032 ** pass will fill in the rest using a fresh allocation.
62359 ** allocation comes from the pSpace/szSpace buffer, *ppFree is set to NULL
62523 /* No memory allocation is ever used on mem1. Prove this using
64532 ** vdbe memory cell to manage the memory allocation required for a
64962 ** A memory allocation error causes p->rc to be set to SQLITE_NOMEM and this
67149 ** Do this now to avoid an oversize memory allocation.
67167 ** allocation, especially if a corrupt database file has caused u.an.offset
67169 ** still exceed Robson memory allocation limits on some configurations.
67172 ** 20 or so. This insures that Robson memory allocation limits are
68049 /* Since it performs no memory allocation or IO, the only value that
70820 ** dynamic allocation in u.cn.sContext.s (a Mem struct) is released.
72796 ** a power-of-two allocation. This mimimizes wasted space in power-of-two
74753 ** for this node and for the pToken argument is a single allocation
74832 ** If pRoot==NULL that means that a memory allocation error has occurred.
75326 /* Note that because the size of the allocation for p->a[] is not
75375 ** If a memory allocation error occurs, the entire list is freed and
75421 ** NULL. If a memory allocation fails, the pParse->db->mallocFailed flag
75446 ** NULL. If a memory allocation fails, the pParse->db->mallocFailed flag
79029 ** If that allocation failed, we would have quit before reaching this
84245 ** suggested initial array size allocation.
84347 ** If a memory allocation fails the SrcList is unchanged. The
86428 ** allocation fails, call sqlite3_result_error_nomem() to notify
88833 /* Disable lookaside memory allocation */
95744 ** Return SQLITE_OK on success. If a memory allocation error occurs,
102866 ** allocation error. The memory allocation failure will be recorded in
107186 ** return value. A single allocation is used to store the WhereInfo
112516 ** This routine must be called to initialize the memory allocation,
112576 ** malloc subsystem - this implies that the allocation of a static
115212 ** memory allocation error, 0 on success, or non-zero for an error.
115773 ** requiring any dynamic allocation. This is sub-optimal because
117595 ** and its contents are allocated using a single allocation. It
117596 ** is the responsibility of the caller to free this allocation
117687 int nByte; /* Size of allocation used for *p */
118115 ** allocation succeeds, zero it and return SQLITE_OK. Otherwise,
118116 ** if the allocation fails, return SQLITE_NOMEM.
122454 ** Return SQLITE_OK if successful, or SQLITE_NOMEM if a memory allocation
122525 ** Enlarge a memory allocation. If an out-of-memory allocation occurs,
122526 ** then free the old allocation.
122566 ** allocation so that the expression can be freed with a single call to
123494 ** Return non-zero if a memory allocation error occurs.
125223 int nSize; /* Size of allocation at aData */
132585 /* Allocate the buffers used by this operation. The allocation is