Re: VC6 vs VC9

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

 



""Louis Solomon [SteelBytes]"" <louis@xxxxxxxxxxxxxx> wrote in message 
news:C66C95C4B9354B6681CF7CC24F8F029B@xxxxxxxxxxxxxxxxxxx
> Hi,
>
> based on comments on http://windows.php.net/qa/ ...
>
> why is the VC9 build compiled to used the CRT as DLLs instead of static? 
> yet I gather the VC6 isn't?

I'm sure they both dynamically link to the CRT. When an application uses 
numerous DLLs and they each dynamically load the CRT, the CRT code is loaded 
once and all application binaries share a single memory heap. This means 
memory can be malloc()ed in one DLL and free()d in another. A static link to 
the CRT would not allow this, and would mean a copy of the CRT code would 
exist in each DLL. (By 'not allow' I mean memory corruption and crashes. 
Unfortunately the code will compile and link without incident.)
>
> why can't the VC9 build be used with apache.org binaries?

Apparently apache.org's binaries are compiled w/ VC6. Mixing 
dynamically-loaded CRT versions creates a similar situation as statically 
linking it: separate heaps, meaning cross-binary memory management will 
cause heap corruption. Just as insidious is the possible difference in 
object size between the two CRT versions. If DLL A assumes a certain object 
is, say, 8 bytes and DLL B assumes 16 bytes, disaster is virtually assured.

-Evan



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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux