** Allocate and return nByte bytes of zeroed memory using sqlite3_malloc(). ** If the allocation fails, set *pRc to SQLITE_NOMEM and return NULL. */
| 10373 | ** If the allocation fails, set *pRc to SQLITE_NOMEM and return NULL. |
| 10374 | */ |
| 10375 | static 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. |
no test coverage detected