Answers
主要取决于编译器的具体实现,一般情况下,由于malloc在申请内存之前指定了申请内存大小,编译器应该记录这个信息,在free时编译器根据这个记录信息进行释放即可。参考一下: How does free know the size of memory to be deleted How does delete[] know how much memory to free
dio001
answered 12 years, 11 months ago