MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / idxMalloc

Function idxMalloc

modules/dasSQLITE/sqlite/shell.c:10375–10386  ·  view source on GitHub ↗

** Allocate and return nByte bytes of zeroed memory using sqlite3_malloc(). ** If the allocation fails, set *pRc to SQLITE_NOMEM and return NULL. */

Source from the content-addressed store, hash-verified

10373** If the allocation fails, set *pRc to SQLITE_NOMEM and return NULL.
10374*/
10375static void *idxMalloc(int *pRc, int nByte){
10376 void *pRet;
10377 assert( *pRc==SQLITE_OK );
10378 assert( nByte>0 );
10379 pRet = sqlite3_malloc(nByte);
10380 if( pRet ){
10381 memset(pRet, 0, nByte);
10382 }else{
10383 *pRc = SQLITE_NOMEM;
10384 }
10385 return pRet;
10386}
10387
10388/*
10389** Initialize an IdxHash hash table.

Callers 11

idxHashAddFunction · 0.85
idxNewConstraintFunction · 0.85
expertConnectFunction · 0.85
expertBestIndexFunction · 0.85
expertOpenFunction · 0.85
idxGetTableInfoFunction · 0.85
idxAuthCallbackFunction · 0.85
idxPopulateOneStat1Function · 0.85
idxPopulateStat1Function · 0.85
sqlite3_expert_newFunction · 0.85
sqlite3_expert_sqlFunction · 0.85

Calls 1

assertFunction · 0.85

Tested by

no test coverage detected