2011-10-19 9 views
7

मैं अपने आवेदन 2GB स्मृति की तुलना में अधिक उपयोग करने में सक्षम होना चाहता हूँ, मैं आसपास googled और पाया कि IMAGE_FILE_LARGE_ADDRESS_AWARE आदेश मुझे ऐसा कर सकते हैं।डेल्फी 2007 IMAGE_FILE_LARGE_ADDRESS_AWARE

तो मैं

{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE} 

{* $ आर .res} जोड़ा मेरे कार्यक्रम के .dpr फ़ाइल के लिए, सभी का उपयोग करता है और बाद में लाइन,

लेकिन जब मैं संकलन, मैं त्रुटि मिलती है:

E2003 Undeclared identifier: 'IMAGE_FILE_LARGE_ADDRESS_AWARE' 

मैं क्या गलत कर रहा हूं?

इसके अलावा, विंडोज 7 64 बिट पर, मैं काम करने के लिए इस आदेश के लिए बूट सेटिंग्स के साथ चारों ओर गंदगी करने की आवश्यकता है, या बस कमांड के साथ एक 32bit आवेदन संकलन और यह सब कुछ किसी और स्वचालित रूप से करेंगे?

धन्यवाद

+10

जोड़ें 'विंडोज का उपयोग करता है –

+2

धन्यवाद, यह काम करता है! – KingOfKong

उत्तर

5

Also, on Windows 7 64bit, do I need to mess around with boot settings for this command to work, or just compile a 32bit application with the command and it will do everything else automatically?

64-बिट Windows स्वचालित रूप से 4 जीबी पता स्थान प्रदान करेगा, बूट तोड़ मरोड़ के बिना।

http://msdn.microsoft.com/en-us/library/windows/desktop/bb613473%28v=vs.85%29.aspx:

To enable an application to use the larger address space, set the IMAGE_FILE_LARGE_ADDRESS_AWARE flag in the image header. The linker included with Microsoft Visual C++ supports the /LARGEADDRESSAWARE switch to set this flag. Setting this flag and then running the application on a system that does not have 4GT support should not affect the application.

On 64-bit editions of Windows, 32-bit applications marked with the IMAGE_FILE_LARGE_ADDRESS_AWARE flag have 4 GB of address space available.

5

वास्तविक सवाल का जवाब में जोड़ने के लिए है इकाई Windows उपयोग करता है।

संबंधित मुद्दे