Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: What Windows 64 bit traps are out there?

by BrowserUk (Patriarch)
on Sep 10, 2011 at 08:38 UTC ( [id://925223]=note: print w/replies, xml ) Need Help??


in reply to What Windows 64 bit traps are out there?

If you install a 32-bit perl on your 64-bit OS, you'll notice almost no differences at all. But you won't gain a huge amount either. Most everything you have from your 32-bit OS will still work exactly the same, but you will still be restricted to 2 GB of memory per perl process.

Conversely, if you opt for a 64-bit perl, you'll find some things that won't work, but you'll gain access to all your physical ram per process.

There are two main sources of incompatibility:

  • 64-bit processes cannot load or use 32-bit DLLs.

    That mean for instance, that if you currently access some (usually non-MS) program using OLE, and there is no 64-bit version of that program available, then you will not be able to access it from a 64-bit perl program.

  • If you currently use a compiled (XS) module that hasn't been updated to be 64-bit compliant, then you won't be able to download that module via PPM from AS and would have to compile it yourself. Which of course would mean solving the problems that prevent it from compiling under a 64-bit compiler. This can range from simple to neigh impossible to do.

My personal take on it definitely go for the 64-bit OS, and seek out 64-bit versions of as many of your favourite apps as you can find. You won't regret it. Remember that pretty much every 32-bit app available will run perfectly happily under 64-bit Windows.

Install a 64-bit perl as your main perl, but also install a 32-bit version as a fall-back for those hopefully rare occasions when you encounter a problem.

Setting your system up to make both available is relatively straight forward. I use the file associations mechanism:

c:\test>set pathext PATHEXT=.pl;.pl8;.com;.exe;.bat;.cmd; c:\test>assoc .pl .pl=Perl c:\test>ftype perl perl="C:\Perl64\bin\perl.exe" "%1" %* c:\test>assoc .pl8 .pl8=perl8 c:\test>ftype perl8 perl8="C:\perl32\bin\perl.exe" "%1" %*

If I name the Perl script .pl, then it gets run using the 64-bit install. Name it .pl8 and the 32-bit install runs it. Personally, I have rarely ever had to resort to using 32-bit in the ~1 1/2 years I've had a 64-bit OS, other than for the occasional comparison. (But I don't use OLE; life's too short.)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://925223]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-25 16:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found