Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问作者实现的TinySTL具体跟标准库有哪些不同 #154

Open
Wuruihanhhh opened this issue Sep 29, 2024 · 1 comment
Open

请问作者实现的TinySTL具体跟标准库有哪些不同 #154

Wuruihanhhh opened this issue Sep 29, 2024 · 1 comment

Comments

@Wuruihanhhh
Copy link

1.请问作者实现的TinySTL具体跟标准库有哪些不同,看到资料说去除了不必要的复杂性和优化代码结构,请问能不能举几个例子呢
2.请问作者v2.0.0版本之后不采用内存池,采用了什么内存分配策略呢
本人菜鸡一枚,面试被问麻了 麻烦作者能回复一下,不胜感激,谢谢谢谢

@frederick-vs-ja
Copy link
Contributor

2.请问作者v2.0.0版本之后不采用内存池,采用了什么内存分配策略呢

和标准库的 std::allocator 一样用 ::operator new/::operator delete

前面那个问题得问下作者,据我了解 MyTinySTL 和标准库的容器部分相比还缺了很多东西,没缺的部分差别不大。 @Alinshans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants