Introduce `PhAllocateHeap` and `PhReAllocateExSafe` in `phlib/basesup.c` to provide heap allocation paths with explicit `NTSTATUS` handling and zero-initialization support. The debug-heap path now also honors `HEAP_ZERO_MEMORY`, keeping allocation behavior consistent between debug and normal builds.
Correct the AVX-512 implementations in `phlib/basesup.c` by restoring the proper types, intrinsics, and comments for the float-to-ulong and ulong-to-float copy helpers. This fixes the two fast paths being accidentally swapped while keeping the scalar conversion semantics intact.
Harden the low-level time/query helpers by using ordered shared-data reads, adding unbiased interrupt time support, and introducing a more precise QPC fast path for x64/ARM64. The update also raises queued work item priority, adds missing bitmap utility routines, and improves several hot memory/entropy paths with AVX-512 and histogram optimizations.
This changeset tightens cache file path handling in phlib by validating leaf names, honoring native vs Win32 path modes consistently, and using the correct directory creation path. It also fixes several functional regressions across the app and plugins: module list filter refresh after highlight toggles, ETW endpoint/port mapping, aggregate sort field usage, graph child window clipping, safer uninstall status text handling, previous-instance shutdown in setup, and improved window-message timeout handling. Additional updates clean up initialization/casts, remove dead code, and address small correctness issues in formatting and utility logic.
Correct several bugs and improve correctness/safety in basesup.c:
- Fix misleading/incorrect parameter comments for virtual memory APIs (BaseAddress semantics and read/write descriptions).
- Adjust PhProtectVirtualMemory to only store OldProtection when caller provided a pointer and to preserve the function's original status return path.
- Restrict the AVX512 fast path to 64-byte aligned From/To addresses to avoid misaligned vector accesses.
- Implement exact unsigned 32-bit to float/double conversion for AVX/AVX2/SSE code paths by clearing the sign bit and adding 2^31 when needed (added masks and scale constants), and simplify shuffles for the SSE path.
These changes fix correctness issues when converting uint64 values via decomposed 32-bit lanes, and prevent unsafe vectorized memory access on unaligned buffers.