Greetings all, I use MinGW32 for doing problems and have reach a point where standard malloc() would throw bad_alloc() whenever i call new. What other alternatives for Windows in memory allocation?
マーズ maazu 2 Light Poster
Recommended Answers
Jump to PostNormally, if bad-alloc is thrown, it indicates that you are trying to allocate more memory than you possibly could, given the amount of memory available on your system (RAM + virtual memory). Make sure you are not trying to allocate such a crazy amount of memory. And if this is …
Jump to PostSome years ago I wrote a bunch of code to generate any number of primes. I used the Sieve of Aristhostenes to generate all the primes up to 10K or so and then used a recursive algorithm to determine primes beyond that. I would write them out to disk, and …
Jump to Postam trying to generate prime numbers well in excess of 1Gbyte of mem.
It does not matter what knid of contortions we go thrugh to allocate memory - new, malloc, HeapAlloc, GlobalAlloc, VirtualAlloc, MapViewOfFile ... - we are fundamentaly limited by the virtual address space that we have. …
All 9 Replies
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
マーズ maazu commented: helpful, will remember those links +0
vijayan121 1,152 Posting Virtuoso
マーズ maazu 2 Light Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
マーズ maazu commented: So, you have done the math decades ago. Would you consider investing in Primecoins? a variant of bitcoin. +0
vijayan121 1,152 Posting Virtuoso
マーズ maazu commented: I need time to think about it. Right now, mingw32 is fine. +0
cheryllocascio 0 Newbie Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.