新算法 [英] new algorithm

查看:77
本文介绍了新算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


哪里可以找到关于new / delete内部工作的一些信息?

这个编译器是特定的还是由标准定义的? ?关于不同的malloc实现有很多信息,但是我找不到

关于新的任何信息。


thx

Hello

Where can I find some info about the inner working of new/delete??
Is this compiler specific or defined by the standard?? There is a lot
of info about the different malloc implementations but I can''t find
anything about new.

thx

推荐答案

wijhierbeneden写道:
wijhierbeneden wrote:
我在哪里可以找到有关new / delete内部工作的一些信息?
这个编译器是特定的还是由标准定义的?关于不同的malloc实现有很多信息,但是我找不到关于new的任何信息。
Where can I find some info about the inner working of new/delete??
Is this compiler specific or defined by the standard?? There is a lot
of info about the different malloc implementations but I can''t find
anything about new.




你想要什么?知道吗?你有什么C ++书?



What do you want to know? What C++ book do you have?


wijhierbeneden写道:
wijhierbeneden wrote:
你好

我在哪里可以找到关于内部工作的新/删除??
这个编译器是特定的还是由标准定义的?


一般行为由3.7.3中的标准定义,该标准关于分配函数(operator new / delete)本身,



5.3.4和5.3.5讨论新的/删除表达式本身,

,当然还有8.5和12.1,讨论初始化/构造函数如何
调用发生。

有很多关于不同malloc实现的信息,但是我找不到任何关于new的信息。
Hello

Where can I find some info about the inner working of new/delete??
Is this compiler specific or defined by the standard??
The general behavior is defined by the standard in 3.7.3 that talks
about the allocation functions (operator new/delete) themselves,
5.3.4 and 5.3.5 which talk about the new/delete expressions themselves,
and of course 8.5 and 12.1 which talk about how initialization/consturctor
invocation occurs.
There is a lot
of info about the different malloc implementations but I can''t find
anything about new.




标准没有讨论分配的实际实现

释放函数内部(只是它们的接口)除了

指出它们的设计能够在没有太多辛劳的情况下在

malloc / delete之上实现。实际上,大多数实现

正是如此。因为它们需要与malloc共存,所以你必须使用另一个来实现一个或者让它们都调用

a第三个通用分配器。



The standard doesn''t discuss the actual implentation of the allocation
deallocation function internals (just their interfaces) other than to
point out that they are designed to be able to be impelemented on top of
malloc/delete without much toil. In actuality, most implementations
do exactly that. Since they need to coexist with malloc, you have to
pretty much implement one in terms of the other or have them both call
a third common allocator.


wi ************ @ hotmail.com (wijhierbeneden)在留言新闻中写道:< 23 ************************* @ posting.google.c om> ; ...
wi************@hotmail.com (wijhierbeneden) wrote in message news:<23*************************@posting.google.c om>...
你好

我在哪里可以找到关于new / delete内部工作的一些信息?
这个编译器是特定的还是由标准定义的??有很多关于不同malloc实现的信息,但我找不到任何关于新的东西。

thx
Hello

Where can I find some info about the inner working of new/delete??
Is this compiler specific or defined by the standard?? There is a lot
of info about the different malloc implementations but I can''t find
anything about new.

thx



C ++内部工作的好书是在C ++对象内部

模型。作者:Stanley Lippman



A good book for the inner workings of C++ is "Inside the C++ Object
Model" by Stanley Lippman


这篇关于新算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆