Skip to main content
6 events
when toggle format what by license comment
Oct 4 at 18:25 comment added Olivia A Okay, I've addressed a number of these things in my codebase now! 1. I am checking all allocate() calls now, not just the ones I wrote after learning I could. 2. I refactored get_answer so that it is caching the results, and no longer needing those excess reads 3. I now have a script which generates select_function(), which should reduce dev time overhead 4. I'm working to move the comparison and printing logic to a function, which should make that more clear
Oct 1 at 15:18 vote accept Olivia A
Sep 27 at 6:35 comment added Toby Speight @Vladimir, that's very dependent on the environment in which you run. For example, I normally run programming-challenge code with a sensible `ulimit -v, to prevent harming more important processes. That usually has the effect of preventing such over-allocation, but does mean that we need to deal with allocation failure.
Sep 27 at 5:20 comment added Vladimir F Героям слава Given the lazy allocaten in modern OS's, testing if allocate failed will in practice fail to detect that there was actually not enough memory. The program will crash at the access anyway. I wouldn't bother.
Sep 26 at 22:03 history edited J_H CC BY-SA 4.0
added 694 characters in body
Sep 26 at 21:51 history answered J_H CC BY-SA 4.0