Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

So when you call malloc or new [] from your C/C++ application, how does the CRT translate it into Windows API calls?

share|improve this question
See this question: stackoverflow.com/questions/6530355/… –  Kilian Foth Aug 18 '12 at 7:33

1 Answer 1

Windows has a HeapAlloc function in the win32 API, maybe it's used.

The major point is that this is not so much related to Windows as it is to your C or C++ implementation. They implement malloc and how new works. So you should go about finding out how malloc and new are implemented in, for example, Visual C++.

I am not a C++ expert, but iirc, you can overload new; so there may be more going on there.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.