Home | History | Annotate | Download | only in orig

Lines Matching refs:malloc

390 **     SQLITE_SYSTEM_MALLOC          // Use normal system malloc()
392 ** SQLITE_MEMDEBUG // Debugging version of system malloc()
939 #define SQLITE_NOMEM 7 /* A malloc() failed */
1831 ** malloc(), realloc() and free() functions from the standard C library.
2012 ** to using its default memory allocator (the system malloc() implementation),
2674 ** Windows VFS uses native malloc() and free() for some operations.
2722 ** the system malloc() and free() directly when converting
3732 ** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
6507 ** <dd>This parameter returns the number malloc attempts that were
6513 ** <dd>This parameter returns the number malloc attempts that might have
6521 ** <dd>This parameter returns the number malloc attempts that might have
8016 ** underlying malloc() implemention might return us 4-byte aligned
9666 ** Lookaside malloc is a set of fixed-size buffers that can be used
9669 ** lookaside malloc provides a significant performance enhancement
9670 ** (approx 10%) by avoiding numerous malloc/free requests while parsing
9674 ** lookaside malloc subsystem. Each available memory allocation in
9727 u8 mallocFailed; /* True if we have seen a malloc failure */
9773 Lookaside lookaside; /* Lookaside malloc configuration */
10607 #define EP_Static 0x8000 /* Held in memory not obtained from malloc() */
11309 char *zBase; /* A base allocation. Not from malloc. */
11362 int isMallocInit; /* True after malloc is initialized */
11363 int isPCacheInit; /* True after malloc is initialized */
11497 ** obtain space from malloc().
12072 ** malloc failures. This is only present if SQLITE_OMIT_BUILTIN_TEST
13115 ** malloc failure when SQLite is invoked recursively by a virtual table
14692 ** So we test the effects of a malloc() failing and the sqlite3OsXXX()
14695 ** The following functions are instrumented for malloc() failure
14926 ** ability to simulate a malloc failure, so that the handling of an
15041 ** malloc failures (when the xMalloc() or xRealloc() method of the
15045 ** Most malloc failures are non-benign. After they occur, SQLite
15048 ** fatal. For example, if a malloc fails while resizing a hash table, this
15050 ** hash table will continue to function normally. So a malloc failure
15097 ** subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc()
15098 ** indicates that subsequent malloc failures are non-benign.
15191 ** SQLite will use the standard C-library malloc/realloc/free interface
15245 #include <malloc/malloc.h>
15257 ** Use standard C library malloc and free on non-Apple systems.
15260 #define SQLITE_MALLOC(x) malloc(x)
15266 # include <malloc.h> /* Needed for malloc_usable_size on linux */
15279 ** Like malloc(), but remember the size of the allocation
15405 /* defer MT decisions to system malloc */
15472 ** SQLite will use the standard C-library malloc/realloc/free interface
15529 ** Number of malloc size increments to track.
15649 /* If memory status is enabled, then the malloc.c wrapper will already
15712 p = malloc(totalSize);
16004 ** use of malloc(). The SQLite user supplies a block of memory
16206 ** will already be held (obtained by code in malloc.c) if
16488 assert( nBytes>0 ); /* malloc.c filters out 0 byte requests */
16693 ** use of malloc(). The application gives SQLite a block of memory
16784 u64 nAlloc; /* Total number of calls to malloc */
16785 u64 totalAlloc; /* Total of all malloc calls - includes internal frag */
16863 ** will already be held (obtained by code in malloc.c) if
18586 /************** Begin file malloc.c ******************************************/
19182 ** If db!=0 and db->mallocFailed is true (indicating a prior malloc
19184 ** Hence for a particular database connection, once malloc starts
19193 ** In other words, if a subsequent malloc (ex: "b") worked, it is assumed
19344 ** function. However, if a malloc() failure has occurred since the previous
19347 ** If the first argument, db, is not NULL and a malloc() error has occurred,
19365 /************** End of malloc.c **********************************************/
20947 ** If a malloc failure occurs, NULL is returned and the db.mallocFailed
22057 ** binary value has been obtained from malloc and must be freed by
22459 ** The key is not copied in this instance. If a malloc fails, then
22696 ** This driver uses malloc()/free() directly rather than going through
22699 ** malloc failures happen frequently. OS/2 does not typically run on
22705 ** wrappers then we will get simulated malloc() failures within this
22707 ** could enhance SQLite to deal with simulated malloc failures within
22709 ** be exercised on Linux (which does not need to malloc() in the driver)
22715 ** avoid the use of malloc()/free(). Those routines work ok on OS/2
29685 ** (b) A malloc failed.
29689 ** descriptors on this file, then no malloc would be required by
33024 ** Space to hold the returned string is obtained from malloc.
35016 ** is obtained from malloc and must be freed by the calling
35924 ** malloc fails.
36134 ** on both a Bitvec object and on a linear array of bits obtained from malloc.
36971 void *pStart, *pEnd; /* Bounds of pagecache malloc range */
37029 ** Malloc function used within this file to allocate space from the buffer
37175 ** Malloc function used by SQLite to obtain space from the buffer configured
39968 ** Use a testcase() macro to make sure that malloc failure within
40117 ** or SQLITE_NOMEM if a malloc failure occurs.
40422 ** malloc error occurs during a rollback, then this will itself cause
40607 ** not be in the pager cache. Later: if a malloc() or IO error occurs
40779 ** fails, SQLITE_NOMEM is returned. Otherwise, if no IO or malloc errors
40790 sqlite3_file *pMaster; /* Malloc'd master-journal file descriptor */
40791 sqlite3_file *pJournal; /* Malloc'd child-journal file descriptor */
41022 ** If an I/O or malloc() error occurs, the journal-file is not deleted
41181 ** malloc error that occurred after the change-counter was updated but
42541 ** SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint
43484 ** to test the case where a malloc error occurs while trying to set
44592 ** malloc failure occurs while populating it in the for(...) loop below.
44896 ** to a malloc() or IO failure), clear the bit in the pInJournal[]
45197 ** (e.g. due to malloc() failure), return an error code.
45320 ** page content. If a malloc fails, this function may return NULL.
46426 u8 *aFrame = 0; /* Malloc'd buffer to load entire frame */
46479 /* Malloc a buffer to read frames into. */
48974 ** A unrecoverable error (an I/O error or a malloc failure) has occurred
49656 ** is returned if a malloc attempt fails.
49943 ** table, then malloc space for and store the pCur->nKey bytes of key
50020 char aSpace[150]; /* Temp space for pIdxKey - to avoid a malloc */
57283 ** malloc is returned if *pnErr is non-zero. If *pnErr==0 then NULL is
58385 ** SQLITE_NOMEM may be returned if a malloc() fails during conversion
58466 ** malloc(). In this way, we know that the memory is safe to be
58469 ** Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.
59247 ** If this routine fails for any reason (malloc returns NULL or unable
59750 ** Zero is returned if a malloc() fails.
59898 /* Return true if hasAbort==mayAbort. Or if a malloc failure occured.
59899 ** If malloc failed, then the while() loop above may not have iterated
60668 /* This happens if a malloc() inside a call to sqlite3_column_text() or
63121 /* Check that malloc() has not failed. If it has, return early. */
63480 ** select list of a SELECT statement) that may cause a malloc() failure. If
63481 ** malloc() has failed, the threads mallocFailed flag is cleared and the result
63497 /* If malloc() failed during an encoding conversion within an
63517 ** need to call malloc() to expand the result of a zeroblob()
63616 /* A malloc may have failed inside of the xFunc() call. If this
64467 ** already. Return non-zero if a malloc() fails.
64542 ** minimizes the number of malloc calls made by the system.
65423 /* This happens if a malloc() inside a call to sqlite3_column_text() or
66301 /* Even though a malloc() has failed, the implementation of the
71144 /* Jump to here if a malloc() fails.
72093 ** set *ppFile to point to the malloc'd file-handle and return SQLITE_OK.
74912 sqlite3ExprListDelete(db, pList); /* Avoid memory leak when malloc fails */
75410 /* Avoid leaking memory if malloc has failed. */
78163 ** the new element. Return a negative number if malloc fails.
78179 ** the new element. Return a negative number if malloc fails.
81439 return; /* A malloc must have failed */
82832 assert( p==pOld ); /* Malloc must have failed inside HashInsert() */
82941 sqlite3 *db = pParse->db; /* Database connection for malloc errors */
84021 assert( p==pIndex ); /* Malloc must have failed */
84254 sqlite3 *db, /* Connection to notify of malloc failures */
84282 ** A new IdList is returned, or NULL if malloc() fails.
84433 sqlite3 *db, /* Connection to notify of malloc failures */
85184 /* If a malloc() failure occurred in sqlite3HashInsert(), it will
86429 ** the database handle that malloc() has failed and return NULL.
90829 ** malloc() and make *pzErrMsg point to that message.
91086 void *(*malloc)(int);
91301 #define sqlite3_malloc sqlite3_api->malloc
92511 /* Malloc may fail when setting the page-size, as there is an internal
95254 ** Space to hold the KeyInfo structure is obtain from malloc. The calling
97026 sqlite3 *db, /* Report malloc errors to this connection */
97058 sqlite3 *db, /* Report malloc errors here */
97070 sqlite3 *db, /* Report malloc errors here */
99225 ** malloc() for space to hold the result and return the entire results
99229 ** from malloc(). But the caller cannot free this memory directly.
101869 assert( pTab==pOld ); /* Malloc must have failed inside HashInsert() */
102046 ** more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise.
102395 sqlite3 *db, /* Database connection for reporting malloc problems */
104862 ** malloc in allocateIndexInfo() fails and this function returns leaving
107653 /* Jump here if malloc fails */
109137 ** malloc.
109298 ** from malloc.
112573 /* Initialize the malloc() system and the recursive pInitMutex mutex.
112576 ** malloc subsystem - this implies that the allocation of a static
112577 ** mutex must not require support from the malloc subsystem.
112600 /* If rc is not SQLITE_OK at this point, then either the malloc
112777 /* Specify an alternative malloc implementation */
112782 /* Retrieve the current malloc() implementation */
112788 /* Enable or disable the malloc status collection */
112845 /* If the heap pointer is NULL, then restore the malloc implementation
112846 ** back to NULL pointers too. This will cause the malloc to go
113509 ** that if a malloc() fails in sqlite3_create_function(), an error code
114069 /* A malloc() may have failed within the call to sqlite3_value_text16()
114083 ** passed to this function, we assume a malloc() failed during sqlite3_open().
114634 ** conversions. The only error that can occur here is a malloc() failure.
114749 /* Enable the lookaside-malloc subsystem */
114934 ** malloc() failure, but SQLite now does this automatically.
115225 ** Register hooks to call to indicate which malloc() failures
115722 void *aStatic[16]; /* Starter space for aArg[]. No malloc required */
116613 ** malloc overhead. When nPendingData exceeds nMaxPendingData, the buffer
117607 const char ***pazCol, /* OUT: Malloc'd array of column names */
118797 char *aaOutput[16]; /* Malloc'd output buffers */
118898 char **paOut, int *pnOut /* OUT: Malloc'd doclist */
122669 ** if a malloc failure occurs, or SQLITE_ERROR if a parse error is encountered.
123336 ** Malloc and Free functions
123619 ** The key is not copied in this instance. If a malloc fails, then
125221 int nMalloc; /* Size of malloc'd buffer at zMalloc */
125222 char *zMalloc; /* Malloc'd space (possibly) used for zTerm */
125225 char *aData; /* Pointer to block from malloc() */
125253 int nMalloc; /* Size of malloc'd buffer at zMalloc */
125254 char *zMalloc; /* Malloc'd space (possibly) used for zTerm */
125720 /* Malloc failed while inserting the new entry. This can only
126138 char **paBlob, /* OUT: Blob data in malloc'd buffer */
129035 ** the required space using malloc().