Very comprehensive collection of information about 64-bit programming:
link to source
By Andrey Karpov,
In this post I’ve collected a lot of links on the topic of 64-bit C/C++ software development. These include my articles and articles by my colleagues in the sphere of developing safe and efficient 64-bit code; FAQ’s and a training course. There are also many reviews of third-party articles on 64-bit software development. Enjoy yourself studying the materials.
1. Articles:
- A Collection of Examples of 64-bit Errors in Real Programs
- About size_t and ptrdiff_t
- 64 bits
- AMD64 (EM64T) architecture
- Other articles
2. Lessons on development of 64-bit C/C++ applications
Main page: http://www.viva64.com/en/l/
The course is composed of 28 lessons devoted to introduction to 64-bit systems, issues of building 64-bit applications, methods of searching errors specific to 64-bit code and code optimization. Such questions are also considered as estimate of the cost of moving to 64-bit systems and rationality of this move.
The contents of the course:
- Lesson 01. What 64-bit systems are.
- Lesson 02. Support of 32-bit applications.
- Lesson 03. Porting code to 64-bit systems. The pros and cons.
- Lesson 04. Creating the 64-bit configuration.
- Lesson 05. Building a 64-bit application.
- Lesson 06. Errors in 64-bit code.
- Lesson 07. The issues of detecting 64-bit errors.
- Lesson 08. Static analysis for detecting 64-bit errors.
- Lesson 09. Pattern 01. Magic numbers.
- Lesson 10. Pattern 02. Functions with variable number of arguments.
- Lesson 11. Pattern 03. Shift operations.
- Lesson 12. Pattern 04. Virtual functions.
- Lesson 13. Pattern 05. Address arithmetic.
- Lesson 14. Pattern 06. Changing an array’s type.
- Lesson 15. Pattern 07. Pointer packing.
- Lesson 16. Pattern 08. Memsize-types in unions.
- Lesson 17. Pattern 09. Mixed arithmetic.
- Lesson 18. Pattern 10. Storage of integer values in double.
- Lesson 19. Pattern 11. Serialization and data interchange.
- Lesson 20. Pattern 12. Exceptions.
- Lesson 21. Pattern 13. Data alignment.
- Lesson 22. Pattern 14. Overloaded functions.
- Lesson 23. Pattern 15. Growth of structures’ sizes.
- Lesson 24. Phantom errors.
- Lesson 25. Working with patterns of 64-bit errors in practice.
- Lesson 26. Optimization of 64-bit programs.
- Lesson 27. Peculiarities of creating installers for a 64-bit environment.
- Lesson 28. Estimating the cost of 64-bit migration of C/C++ applications.
You may open all the lessons in one file (the print version as well).
3. Knowledge Base
- Can I use 32-bit pointers in a 64-bit application?
- How can a 32-bit program detect that it is launched in a 64-bit Windows?
- Functions of the ntohl/htonl class and 64-bit values
- Other…
5. Blog
- 64-bit programs and floating-point calculations
- The reasons why 64-bit programs require more stack memory
- Searching for explicit conversion of a pointer to a 32-bit type
- Other posts…
6. Detect 64-Bit Portability Issues
7. Terminology