** Allocate and return nByte bytes of zeroed memory using sqlite3_malloc(). ** If the allocation fails, set *pRc to SQLITE_NOMEM and return NULL. */
| 8530 | ** If the allocation fails, set *pRc to SQLITE_NOMEM and return NULL. |
| 8531 | */ |
| 8532 | static void *idxMalloc(int *pRc, int nByte){ |
| 8533 | void *pRet; |
| 8534 | assert( *pRc==SQLITE_OK ); |
| 8535 | assert( nByte>0 ); |
| 8536 | pRet = sqlite3_malloc(nByte); |
| 8537 | if( pRet ){ |
| 8538 | memset(pRet, 0, nByte); |
| 8539 | }else{ |
| 8540 | *pRc = SQLITE_NOMEM; |
| 8541 | } |
| 8542 | return pRet; |
| 8543 | } |
| 8544 | |
| 8545 | /* |
| 8546 | ** Initialize an IdxHash hash table. |
no outgoing calls
no test coverage detected