mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Continuing work on the new memory allocation subsystem.
Added routines for temporary memory allocation. Right the btree balance mechanism to only do one temporary allocation at a time. (CVS 5220) FossilOrigin-Name: 65fe7b62cfe7d11cd667681a64c96fe7b2fe5685
This commit is contained in:
6
src/os.c
6
src/os.c
@@ -13,7 +13,7 @@
|
||||
** This file contains OS interface code that is common to all
|
||||
** architectures.
|
||||
**
|
||||
** $Id: os.c,v 1.112 2008/06/13 18:24:27 drh Exp $
|
||||
** $Id: os.c,v 1.113 2008/06/15 02:51:48 drh Exp $
|
||||
*/
|
||||
#define _SQLITE_OS_C_ 1
|
||||
#include "sqliteInt.h"
|
||||
@@ -38,7 +38,7 @@
|
||||
*/
|
||||
#if defined(SQLITE_TEST) && (OS_WIN==0)
|
||||
#define DO_OS_MALLOC_TEST if (1) { \
|
||||
void *pTstAlloc = sqlite3_malloc(10); \
|
||||
void *pTstAlloc = sqlite3Malloc(10); \
|
||||
if (!pTstAlloc) return SQLITE_IOERR_NOMEM; \
|
||||
sqlite3_free(pTstAlloc); \
|
||||
}
|
||||
@@ -168,7 +168,7 @@ int sqlite3OsOpenMalloc(
|
||||
){
|
||||
int rc = SQLITE_NOMEM;
|
||||
sqlite3_file *pFile;
|
||||
pFile = (sqlite3_file *)sqlite3_malloc(pVfs->szOsFile);
|
||||
pFile = (sqlite3_file *)sqlite3Malloc(pVfs->szOsFile);
|
||||
if( pFile ){
|
||||
rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags);
|
||||
if( rc!=SQLITE_OK ){
|
||||
|
Reference in New Issue
Block a user