cpp-docs/heap-set-heap-size.md at main - GitHub

文章推薦指數: 80 %
投票人數:10人

Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio. Select the Configuration Properties > ... Skiptocontent {{message}} MicrosoftDocs / cpp-docs Public Notifications Fork 811 Star 1k Code Issues 555 Pullrequests 6 Actions Projects 4 Wiki Security Insights More Code Issues Pullrequests Actions Projects Wiki Security Insights Permalink main Branches Tags Couldnotloadbranches Nothingtoshow {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default cpp-docs/docs/build/reference/heap-set-heap-size.md Gotofile Gotofile T Gotoline L Copypath Copypermalink Thiscommitdoesnotbelongtoanybranchonthisrepository,andmaybelongtoaforkoutsideoftherepository.     Cannotretrievecontributorsatthistime /HEAP(SetHeapSize) Remarks TosetthislinkeroptionintheVisualStudiodevelopmentenvironment Tosetthislinkeroptionprogrammatically Seealso 42lines(27sloc) 1.88KB Raw Blame Editthisfile E OpeninGitHubDesktop OpenwithDesktop Viewraw Viewblame description title ms.date f1_keywords helpviewer_keywords ms.assetid Learnmoreabout:/HEAP(SetHeapSize) /HEAP(SetHeapSize) 11/04/2016 VC.Project.VCLinkerTool.HeapCommitSize VC.Project.VCLinkerTool.HeapReserveSize -HEAPlinkeroption heapallocation,settingheapsize /HEAPlinkeroption HEAPlinkeroption a3f71927-7f1d-492c-9fdb-dfccb1a043da /HEAP(SetHeapSize) /HEAP:reserve[,commit] Remarks The/HEAPoptionsetsthesizeoftheheapinbytes.Thisoptionisonlyforusewhenbuildingan.exefile. Thereserveargumentspecifiesthetotalheapallocationinvirtualmemory.Thedefaultheapsizeis1MB.Thelinkerroundsupthespecifiedvaluetothenearest4bytes. Theoptionalcommitargumentspecifiestheamountofphysicalmemorytoallocateatatime.Committedvirtualmemorycausesspacetobereservedinthepagingfile.Ahighercommitvaluesavestimewhentheapplicationneedsmoreheapspace,butincreasesthememoryrequirementsandpossiblythestartuptime. SpecifythereserveandcommitvaluesindecimalorC-languagenotation. ThisfunctionalityisalsoavailableviaamoduledefinitionfilewithHEAPSIZE. TosetthislinkeroptionintheVisualStudiodevelopmentenvironment Opentheproject'sPropertyPagesdialogbox.Fordetails,seeSetC++compilerandbuildpropertiesinVisualStudio. SelecttheConfigurationProperties>Linker>Systempropertypage. ModifytheHeapCommitSizeproperty. Tosetthislinkeroptionprogrammatically Seexref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.HeapReserveSize%2Aandxref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.HeapCommitSize%2A. Seealso MSVClinkerreference MSVCLinkerOptions Go Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.



請為這篇文章評分?