The maximum malloc space in Visual Studio C++ -


i writing simulation program, , define struct node, of 544 bytes. in program need malloc millions of nodes. each time when maximum number reaches 3 million,

newnode=malloc(node) 

will return null. takes 250mb of memory. can tell me why happens , how solve problem?

as c++ use new() http://www.cplusplus.com/reference/new/ if allocation not finished. new should throw exception. need after print/debug exception , google it. maybe help

check gcc if problem same. if not has visual studio compiler specific problem (i doubt that)


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -