Re: [VOTE] 64 bit platform improvements for string length and integer

From: Date: Fri, 31 Jan 2014 12:10:01 +0000
Subject: Re: [VOTE] 64 bit platform improvements for string length and integer
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-71864@lists.php.net to get a copy of this message
On Fri, Jan 31, 2014 at 11:57 AM, Pierre Joye <pierre.php@gmail.com> wrote: > > On Jan 31, 2014 12:54 PM, "Jakub Zelenka" <bukka@php.net> wrote: > > > > > > - before the patch: 8B (ptr) + 4B (int) + 4B (alignment) = 16B > > - after the patch: 8B (ptr) + 8B (size_t) = 16B > > > > That seems like no increase to me. Is there anything else that I missed? > > size_t will be 8 bytes on most architecture. That's 4 bytes more than what > we have now for buffer length (using int). > Yeah but the final size of zval is the same. With int the memory is aligned and the extra 4 bytes are not used. It means that the size for zvalue_value was 16B on 64bit anyway (see above). On 32bit the size of size_t and int is 4 bytes so there is no difference - 8 bytes for zvalue_value. Regards Jakub

« previous php.internals (#71864) next »