mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-27 13:33:18 +08:00
c++ override test new placement operator
This commit is contained in:
parent
824fd8a7b1
commit
cbccbbe9a4
@ -95,6 +95,10 @@ static void various_tests() {
|
|||||||
delete t;
|
delete t;
|
||||||
t = new (std::nothrow) Test(42);
|
t = new (std::nothrow) Test(42);
|
||||||
delete t;
|
delete t;
|
||||||
|
auto tbuf = new unsigned char[sizeof(Test)];
|
||||||
|
t = new (tbuf) Test(42);
|
||||||
|
t->~Test();
|
||||||
|
delete tbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Static {
|
class Static {
|
||||||
@ -298,4 +302,4 @@ static void tsan_numa_test() {
|
|||||||
auto t1 = std::thread(dummy_worker);
|
auto t1 = std::thread(dummy_worker);
|
||||||
dummy_worker();
|
dummy_worker();
|
||||||
t1.join();
|
t1.join();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user