Tagged articles

new operator

4 articles · Page 1 of 1
Deepin Linux
Deepin Linux
Jul 13, 2026 · Fundamentals

What Hidden Costs Does C++ new Add to Heap Allocation?

The article reveals that using C++ new or malloc is far from cost‑free, detailing how Linux virtual address space, system‑call overhead, memory‑header metadata, fragmentation, and page‑fault latency all contribute to hidden performance penalties, and it offers concrete techniques such as stack allocation, memory pools, restrained PImpl usage, and startup pre‑allocation to mitigate these costs.

C++Linuxheap
0 likes · 23 min read
What Hidden Costs Does C++ new Add to Heap Allocation?
ITPUB
ITPUB
Apr 27, 2016 · Fundamentals

Why new T[10] Differs on Windows vs Linux: Default vs Value Initialization in C++

The article explains why allocating an array with new sample[10] yields zero‑initialized memory on Linux but uninitialized memory on Windows, clarifies the difference between default and value initialization in C++, and shows how various new expressions behave with concrete code examples.

C++cross‑platformdefault initialization
0 likes · 10 min read
Why new T[10] Differs on Windows vs Linux: Default vs Value Initialization in C++