1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Add a debugging memory allocator. (CVS 4227)

FossilOrigin-Name: 8d2d1c4ff9dca61f75e3048107ee9712d346a28c
This commit is contained in:
drh
2007-08-15 17:07:57 +00:00
parent 90f6a5beff
commit 4c3645c601
5 changed files with 391 additions and 11 deletions

View File

@@ -12,9 +12,16 @@
** This file contains the C functions that implement a memory
** allocation subsystem for use by SQLite.
**
** $Id: mem1.c,v 1.1 2007/08/15 13:04:54 drh Exp $
** $Id: mem1.c,v 1.2 2007/08/15 17:07:57 drh Exp $
*/
/*
** This version of the memory allocator is the default. It is
** used when no other memory allocator is specified using compile-time
** macros.
*/
#if !defined(SQLITE_MEMDEBUG) && !defined(SQLITE_OMIT_MEMORY_ALLOCATION)
/*
** We will eventually construct multiple memory allocation subsystems
** suitable for use in various contexts:
@@ -202,3 +209,5 @@ void *sqlite3_realloc(void *pPrior, unsigned int nBytes){
sqlite3_mutex_leave(memMutex);
return (void*)p;
}
#endif /* !SQLITE_MEMDEBUG && !SQLITE_OMIT_MEMORY_ALLOCATION */