About 124,000 results
Open links in new tab
  1. How to check memory allocation failures with new operator?

    With C, I used malloc and after that I check if malloc was successful but with C++, I use 'new' to allocate memory and I would like to know how you would normally check the memory allocation failure.

  2. How do I safely handle memory allocation errors in C?

    Sep 20, 2024 · It is called an "optimistic allocation strategy" and memory can be overcommitted. The program may fail at any time due to insufficient available memory. The memory will not be allocated …

  3. How and why an allocation memory can fail? - Stack Overflow

    Sep 8, 2013 · Up to my knowledge, an allocation memory can fail if there is not enough space in the free store. But does this situation really occur nowadays, with several GB of RAM (at least on a regular …

  4. Java GC (Allocation Failure) - Stack Overflow

    Feb 5, 2015 · 248 "Allocation Failure" is a cause of GC cycle to kick in. "Allocation Failure" means that no more space left in Eden to allocate object. So, it is normal cause of young GC. Older JVM were …

  5. c - How detect malloc failure? - Stack Overflow

    Jun 13, 2011 · This is the most common and reliable test to detect an allocation failure. If you want to be portable beyond POSIX/SUS, I wouldn't trust errno though. If you need detail, say for logging, I'd …

  6. Dynamic Memory Allocation Failure Recovery - Stack Overflow

    Jan 10, 2009 · Dynamic memory allocation is a bad habit from desktop programming that is not suited on restricted-resource machines (unless you spend a fair bit of time and effort creating a good …

  7. node.js - nodejs memory allocation failure - Stack Overflow

    Oct 11, 2017 · How big is the data you're trying to decrypt? You need to figure out what is using too much memory in your node.js app and/or, you need to increase the amount of memory you node.js …

  8. GC (Allocation Failure) VS OutOfMemoryError Exception

    May 9, 2017 · GC (Allocation Failure) is similar, except it occurs when the garbage collector runs out of memory on the heap, and it attempts to allocate more. If your allocated memory is higher than your …

  9. Should we check if memory allocations fail? - Stack Overflow

    Feb 4, 2013 · 8 Yes, you should check for a null return value from malloc. Even if you can't recover from the failure of memory allocation you should explicitly exit. Carrying on as though memory allocation …

  10. What are reasons for a bad allocation exception

    Sep 11, 2022 · The documentation says that std::bad_alloc exception is thrown on failure to allocated storage. What are the steps that for example Windwos 10 does to allocated heap storage for a C++ …