aboutsummaryrefslogtreecommitdiff
path: root/src/test_async.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-08-16 04:30:38 +0000
committerdrh <drh@noemail.net>2007-08-16 04:30:38 +0000
commit174357527a47e97f3d782c1327be6dfd48f7082f (patch)
tree846ccc36dd9fae23e6c33b52686b4f742ca7640d /src/test_async.c
parent0e6f1546b05fd04fb3b3e963df948259683deee4 (diff)
downloadsqlite-174357527a47e97f3d782c1327be6dfd48f7082f.tar.gz
sqlite-174357527a47e97f3d782c1327be6dfd48f7082f.zip
Half-way through a major refactoring of the memory allocation.
I have not even attempted to compile so I am certain there are countless errors. (CVS 4231) FossilOrigin-Name: deb7ecd65f7b83eaf0ba610eeef3b0ede61db1c3
Diffstat (limited to 'src/test_async.c')
-rw-r--r--src/test_async.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test_async.c b/src/test_async.c
index af9a476cb..9f38f2c7c 100644
--- a/src/test_async.c
+++ b/src/test_async.c
@@ -316,8 +316,8 @@ static const char *azOpcodeName[] = {
**
**
** For an ASYNC_WRITE operation, zBuf points to the data to write to the file.
-** This space is sqliteMalloc()d along with the AsyncWrite structure in a
-** single blob, so is deleted when sqliteFree() is called on the parent
+** This space is sqlite3_malloc()d along with the AsyncWrite structure in a
+** single blob, so is deleted when sqlite3_free() is called on the parent
** structure.
*/
struct AsyncWrite {
@@ -343,8 +343,8 @@ struct AsyncFile {
/*
** Add an entry to the end of the global write-op list. pWrite should point
-** to an AsyncWrite structure allocated using sqlite3OsMalloc(). The writer
-** thread will call sqlite3OsFree() to free the structure after the specified
+** to an AsyncWrite structure allocated using sqlite3_malloc(). The writer
+** thread will call sqlite3_free() to free the structure after the specified
** operation has been completed.
**
** Once an AsyncWrite structure has been added to the list, it becomes the
@@ -410,7 +410,7 @@ static int addNewAsyncWrite(
if( op!=ASYNC_CLOSE && async.ioError ){
return async.ioError;
}
- p = sqlite3OsMalloc(sizeof(AsyncWrite) + (zByte?nByte:0));
+ p = sqlite3_malloc(sizeof(AsyncWrite) + (zByte?nByte:0));
if( !p ){
return SQLITE_NOMEM;
}
@@ -718,7 +718,7 @@ static int asyncOpenFile(
n = strlen(zName);
for(i=n-1; i>=0 && zName[i]!='/'; i--){}
- p = (AsyncFile *)sqlite3OsMalloc(sizeof(AsyncFile) + n - i);
+ p = (AsyncFile *)sqlite3_malloc(sizeof(AsyncFile) + n - i);
if( !p ){
rc = SQLITE_NOMEM;
goto error_out;
@@ -755,7 +755,7 @@ static int asyncOpenExclusive(const char *z, OsFile **ppFile, int delFlag){
i64 i = (i64)(delFlag);
rc = addNewAsyncWrite(pFile, ASYNC_OPENEXCLUSIVE, i, nByte, z);
if( rc!=SQLITE_OK ){
- sqlite3OsFree(pFile);
+ sqlite3_free(pFile);
*ppFile = 0;
}
}
@@ -991,7 +991,7 @@ static void *asyncWriterThread(void *NotUsed){
ASYNC_TRACE(("CLOSE %s\n", p->pFile->zName));
sqlite3OsClose(&p->pFile->pBaseWrite);
sqlite3OsClose(&p->pFile->pBaseRead);
- sqlite3OsFree(p->pFile);
+ sqlite3_free(p->pFile);
break;
case ASYNC_OPENDIRECTORY:
@@ -1048,7 +1048,7 @@ static void *asyncWriterThread(void *NotUsed){
async.pQueueLast = 0;
}
async.pQueueFirst = p->pNext;
- sqlite3OsFree(p);
+ sqlite3_free(p);
assert( holdingMutex );
/* An IO error has occured. We cannot report the error back to the