Handle a real system malloc() failure in mem1.c. (CVS 5281)
FossilOrigin-Name: 006fd69bf56f05448fd9aa82d3b1cdcc175369ad
This commit is contained in:
parent
834a5aab16
commit
950292fbb8
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Remove\sa\snon-ansi\sconstruct\sfrom\smem1.c\s-\san\sassert()\sstatement\sbefore\sthe\svariable\sdeclarations\sin\sa\sfunction.\s(CVS\s5280)
|
||||
D 2008-06-23T14:40:18
|
||||
C Handle\sa\sreal\ssystem\smalloc()\sfailure\sin\smem1.c.\s(CVS\s5281)
|
||||
D 2008-06-23T15:10:25
|
||||
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
|
||||
F Makefile.in ff6f90048555a0088f6a4b7406bed5e55a7c4eff
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -118,7 +118,7 @@ F src/loadext.c 40024a0f476c1279494876b9a002001b29e5d3e3
|
||||
F src/main.c c5a5b0d7826f9abeb16c75edfae72ec24594ce28
|
||||
F src/malloc.c f52166df8abd7ff6990dbee1a0ce3534addc8617
|
||||
F src/md5.c 008216bbb5d34c6fbab5357aa68575ad8a31516a
|
||||
F src/mem1.c 381aa498522b404e95d470670fc83702fa30025c
|
||||
F src/mem1.c 8340fa5f969e9f9b9bdeb54106457a2003456d2b
|
||||
F src/mem2.c 23f9538f35fbcd5665afe7056a56be0c7ed65aa7
|
||||
F src/mem3.c 28b4812b87470a00b11821fb5850e7cabcce06c6
|
||||
F src/mem4.c 6703adb1717b26d9d70a1c2586b4b7b7ffee7909
|
||||
@ -592,7 +592,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P edae76d6ff5918007c0a802a34e65412f8f0ebb6
|
||||
R c13f4e2a5a84b597d7d8ead887a168f5
|
||||
P 1de98da6b4c2039e5dc594cc9bfc7d49ae36697c
|
||||
R 1096b6f46bafe59852717e33d5ec098a
|
||||
U danielk1977
|
||||
Z 2e3925d1d8a7d85edad82d8d186950e7
|
||||
Z 14a1331b5777495bf864709dca28d63b
|
||||
|
@ -1 +1 @@
|
||||
1de98da6b4c2039e5dc594cc9bfc7d49ae36697c
|
||||
006fd69bf56f05448fd9aa82d3b1cdcc175369ad
|
@ -17,7 +17,7 @@
|
||||
** This file contains implementations of the low-level memory allocation
|
||||
** routines specified in the sqlite3_mem_methods object.
|
||||
**
|
||||
** $Id: mem1.c,v 1.22 2008/06/23 14:40:18 danielk1977 Exp $
|
||||
** $Id: mem1.c,v 1.23 2008/06/23 15:10:25 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@ -41,8 +41,11 @@ static void *sqlite3MemMalloc(int nByte){
|
||||
assert( nByte>0 );
|
||||
nByte = (nByte+7)&~7;
|
||||
p = malloc( nByte+8 );
|
||||
p[0] = nByte;
|
||||
return (void*)&p[1];
|
||||
if( p ){
|
||||
p[0] = nByte;
|
||||
p++;
|
||||
}
|
||||
return (void *)p;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user