On 7/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
in the os_common.h file there are
sqlite3GenericMalloc,sqlite3GenericRealloc,sqlite3GenericFree,sqlite3GenericAllocationSize
function.
If I run the sqlite in windows,the sqlite3GenericRealloc function just
call the realloc function.
from the msdn and my test,the realloc(void *p, n)function,the realloc size
must equel or bigger than the malloc size, or it will be corrupt.

But when I trace the sqlite3_3_17, I find the realloc size sometimes can
smaller than the original malloc size for the same memory pointer,I think
this should be error.

realloc does not require size to be larger than the last alloc size.
if msdn says otherwise it is mistaken.  vc++ implements it correctly.

But I still can get the right result by running the simple.
Is it a problem?

anybody trace the realloc function?

Thanks in advance.

BR
allen.zhang







--
Cory Nelson

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to