Compare commits
No commits in common. "1cfbcffe94ec1aeb1444baec47769814d58590f6" and "6cd26d5ee96b2ba922948b8178dae0ac6a6e7fc9" have entirely different histories.
1cfbcffe94
...
6cd26d5ee9
@ -3,9 +3,6 @@ project(allocPool)
|
|||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
|
|
||||||
add_compile_options(-fsanitize=address)
|
|
||||||
add_link_options(-fsanitize=address)
|
|
||||||
|
|
||||||
add_executable(allocPool main.cpp
|
add_executable(allocPool main.cpp
|
||||||
allocPool.hpp
|
allocPool.hpp
|
||||||
tests.cpp
|
tests.cpp
|
||||||
|
@ -24,11 +24,6 @@ public:
|
|||||||
initArray(defaultAllocNumbers);
|
initArray(defaultAllocNumbers);
|
||||||
}
|
}
|
||||||
|
|
||||||
~allocPool() {
|
|
||||||
for (auto i: vec)
|
|
||||||
delete i;
|
|
||||||
}
|
|
||||||
|
|
||||||
T *getPtr() {
|
T *getPtr() {
|
||||||
if (pivot == 0)
|
if (pivot == 0)
|
||||||
resizeVec();
|
resizeVec();
|
||||||
|
1
main.cpp
1
main.cpp
@ -34,5 +34,6 @@ int main() {
|
|||||||
|
|
||||||
std::cout << "Time (milliseconds) required for real allocations when constructing pool: " <<
|
std::cout << "Time (milliseconds) required for real allocations when constructing pool: " <<
|
||||||
std::chrono::duration_cast<std::chrono::milliseconds>(endAlloc - startAlloc).count() << "\n";
|
std::chrono::duration_cast<std::chrono::milliseconds>(endAlloc - startAlloc).count() << "\n";
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user