/* Allocate memory. This routine is like sqlite3_malloc() except that it assumes the memory subsystem has already been initialized.  */
SQLITE_PRIVATE void * sqlite3Malloc(int)
/* Allocate memory. This routine is like sqlite3_malloc() except that it assumes the memory subsystem has already been initialized.  */
SQLITE_PRIVATE void * sqlite3Malloc(int)
{
  void *p;
  if( n<=0 
   || n>=0x7fffff00
  ){
    p = 0;
  }else if( sqlite3GlobalConfig.bMemstat ){
    sqlite3_mutex_enter(mem0.mutex);
    mallocWithAlarm(n, &p);
    sqlite3_mutex_leave(mem0.mutex);
  }else{
    p = sqlite3GlobalConfig.m.xMalloc(n);
  }
  assert( EIGHT_BYTE_ALIGNMENT(p) );
  return p;
}