이번에는 DefaultAllocator를 구현했다.
말 그대로 메모리를 할당해주는 녀석인데, new를 이용해 메모리를 할당해줄수도 있지만,
특정 상황에서는 스택에 미리 잡아놓고 메모리를 관리하는 경우도 있었다.
자료구조가 상황에 따라 선택할 수 있도록 DefaultAllocator를 먼저 구현했다.
DefaultAllocator는 new를 사용해서 메모리를 할당하도록 했다.
언젠가 Stack에 메모리를 잡아서 따로 관리해주는 Allocator를 구현해볼 예정이다.
https://github.com/SanGyuk-Raccoon/ToyProject/blob/master/DataStructure/Allocator.h
GitHub - SanGyuk-Raccoon/ToyProject
Contribute to SanGyuk-Raccoon/ToyProject development by creating an account on GitHub.
github.com
'C++ > DataStructure' 카테고리의 다른 글
| [DataStructure] Singly Linked List (0) | 2023.01.08 | 
|---|---|
| [DataStructure] TestBase.h / TestModule.h (0) | 2023.01.08 | 
| [DataStructure] LogManager.h (0) | 2023.01.08 |