1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Additional code to make sure and to assert that memory allocations have

8-byte alignment.  Ticket #3777. (CVS 6450)

FossilOrigin-Name: 208382e032134d9c78fe1cfcb98ce9defb4e3e26
This commit is contained in:
drh
2009-04-05 12:22:08 +00:00
parent 3c71364643
commit ea598cbd8d
8 changed files with 50 additions and 31 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.850 2009/04/01 18:03:01 danielk1977 Exp $
** @(#) $Id: sqliteInt.h,v 1.851 2009/04/05 12:22:09 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@@ -455,6 +455,11 @@ extern const int sqlite3one;
*/
#define ROUNDDOWN8(x) ((x)&~7)
/*
** Assert that the pointer X is aligned to an 8-byte boundary.
*/
#define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&7)==0)
/*
** An instance of the following structure is used to store the busy-handler
** callback for a given sqlite handle.