For C ++, the difference between free storage and heap has become purely conceptual. As a jar for collecting errors, and one for collecting cookies. One is marked one way, the other the other. This designation is intended to bring home to the point that you NEVER mix "new" and "delete" with "malloc", "realloc" or "free" (or, for example, bit levels).
During the interviews, it’s good to say that “the new and the remote use the free store, malloc and the free use of the heap, the new and remote calls to the constructor and destructor, respectively, however malloc and free do not.” However, you often hear that memory segments are indeed in the same area, however CAN may be specific to the compiler, that is, it is possible that both can designate different memory spaces as pools (not sure why this would be , though).
Kit10 Feb 08 2018-12-12T00: 00Z
source share