aboutsummaryrefslogtreecommitdiff
path: root/src/mem5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem5.c')
-rw-r--r--src/mem5.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mem5.c b/src/mem5.c
index 3fe04e245..feb1cb7e9 100644
--- a/src/mem5.c
+++ b/src/mem5.c
@@ -268,7 +268,10 @@ static void *memsys5MallocUnsafe(int nByte){
** two in order to create a new free block of size iLogsize.
*/
for(iBin=iLogsize; mem5.aiFreelist[iBin]<0 && iBin<=LOGMAX; iBin++){}
- if( iBin>LOGMAX ) return 0;
+ if( iBin>LOGMAX ){
+ sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes", nByte);
+ return 0;
+ }
i = memsys5UnlinkFirst(iBin);
while( iBin>iLogsize ){
int newSize;