CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2025/05/27 06:40:37
Modified files: lib/libc/stdlib: malloc.3 Log message: Delete bad advice about abusing malloc_options = "X" as a production feature to terminate the program when out of memory. Application code should always handle failure of library functions properly. So if you want your program to terminate, write something like | p = malloc(...); | if (p == NULL) | err(1, NULL); and don't abuse malloc_options. Direction suggested by otto@ after anton@ pointed out that this very old text still used an outdated data type for malloc_options and potentially failed to define its value at compile time. OK otto@