mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
- This will save some memory w/ GCC compilers on some platforms
This commit is contained in:
parent
5da185594c
commit
b862a8b728
1 changed files with 5 additions and 1 deletions
|
@ -54,8 +54,12 @@ typedef union _align_test {
|
|||
|
||||
#define MAX_CACHED_MEMORY 64
|
||||
#define MAX_CACHED_ENTRIES 16
|
||||
|
||||
#if (defined (__GNUC__) && __GNUC__ >= 2)
|
||||
#define PLATFORM_ALIGNMENT (__alignof__ (zend_mem_header))
|
||||
#else
|
||||
#define PLATFORM_ALIGNMENT (sizeof(align_test))
|
||||
#endif
|
||||
|
||||
#define PLATFORM_PADDING (((PLATFORM_ALIGNMENT-sizeof(zend_mem_header))%PLATFORM_ALIGNMENT+PLATFORM_ALIGNMENT)%PLATFORM_ALIGNMENT)
|
||||
|
||||
ZEND_API char *zend_strndup(const char *s, unsigned int length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue