Using Visual Studio for c++; does std::list use new to allocate nodes? I ask because I’m coding a memory heap as a challenge and, if it uses new, that reduces the effectiveness of the memory heap.
Memory heap as per this question, first answer: How to implement a memory heap
If it does use new, how would I fix it (in relation to using the linked list for the memory heap outlined in the answer to the above question)?
Thanks.
STL containers (so-called because the design is based on the STL) in the C++ Standard have a template parameter which specifies an allocator. That allocator is used. It defaults to a library-provided allocator, but you can pass your own that uses your custom heap.