- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
Latest commit
19 lines (17 loc) · 561 Bytes
/
Copy pathmain.cpp
File metadata and controls
19 lines (17 loc) · 561 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include"memory.hpp"
#include"test.hpp"
// fixed-size memory pool 测试程序
intmain() {
std::cout << "=============== Fixed-Size Memory Pool Test ===============\n\n";
test_basic();
test_performance();
test_space();
test_thread_safety();
benchmark_per_page_locking_safe();
/* 打印最终池状态 */
FixedSizeMemory final_pool(BLOCK_SIZE);
std::cout << "[INFO] 最终池参数:\n";
print_pool_stat(final_pool);
std::cout << "===================== 所有测试完成 =====================\n";
return0;
}