Re: Re: PHP on 64bit Ubuntu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes and No. PHP could be storing bools as a bit packed in a long word.
But your point about compiling is sill more valid. Compiling 32bit
instructions may use instructions that offer off-alignment memory
referencing. That is -- a bool may actual take only a byte in a 32bit
system. That instruction may not be available in 64bit mode. Thus that
bool taking a whole long word. 8x the space, not twice.

Let's write some assembly!

On Wed, Sep 3, 2008 at 11:41 PM, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:
> On Wed, 2008-09-03 at 23:39 -0700, steve wrote:
>> > A word boundary usually matches the natural integer size for the
>> > processor. In the case of a 32 bit processor it would be 32 bits, in the
>> > case of a 64 bit processor it would be 64 bits. This may or may not hold
>> > for windows, but more than likely the word size doubles between the 32
>> > bit architecture and the 64 bit architecture. As such due to alignment
>> > we would still see only a maximal doubling of space. Fringe cases may
>> > exist to satisfy your argument, but I doubt PHP falls into this
>> > category... especially as relates to a packaged binary or default
>> > configure.
>>
>> I didn't mean for the PHP binary itself, but the PHP code written in
>> PHP that is parsed:
>>
>> $test = true;
>
> But the PHP binary is what allocates the memory. It all comes down to
> how the PHP binary was compiled.
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux