summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/malloc.cpp
AgeCommit message (Collapse)Author
2021-02-24LibC: Avoid double memory clearing in calloc()Andreas Kling
calloc() was internally calling malloc_impl() which would scrub out all the allocated memory with the scrub byte (0xdc). We would then immediately zero-fill the memory. This was obviously a waste of time, and our hash tables were doing it all the time. :^)
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-17LibC: Convert dbgprintf() => dbgln()Andreas Kling
2021-01-31LibC: Don't honor LIBC_* malloc debugging flags in AT_SECURE contextAndreas Kling
Just ignore all these environment flags if the AT_SECURE flag is set in the program's auxiliary vector. This prevents a user from tricking set-uid programs into dumping debug information via environment flags.
2021-01-25Everywhere: Hook up remaining debug macros to Debug.h.asynts
2021-01-25Everywhere: Remove unnecessary debug comments.asynts
It would be tempting to uncomment these statements, but that won't work with the new changes. This was done with the following commands: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/#define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/#define/ { toggle = 1 }' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/ #define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/ #define/ { toggle = 1 }' {} \;
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling