mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
Merge pull request #708 from devnexen/new_placement_tests
c++ override test new placement operator
This commit is contained in:
commit
2141e414a7
1 changed files with 5 additions and 1 deletions
|
@ -97,6 +97,10 @@ static void various_tests() {
|
|||
delete t;
|
||||
t = new (std::nothrow) Test(42);
|
||||
delete t;
|
||||
auto tbuf = new unsigned char[sizeof(Test)];
|
||||
t = new (tbuf) Test(42);
|
||||
t->~Test();
|
||||
delete tbuf;
|
||||
}
|
||||
|
||||
class Static {
|
||||
|
@ -307,4 +311,4 @@ static void tsan_numa_test() {
|
|||
auto t1 = std::thread(dummy_worker);
|
||||
dummy_worker();
|
||||
t1.join();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue