mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
more complete C++ support for compliance and performance
This commit is contained in:
parent
49ceb4d018
commit
461b8aed80
4 changed files with 132 additions and 75 deletions
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include <mimalloc.h>
|
||||
|
||||
#include <new>
|
||||
|
||||
static void* p = malloc(8);
|
||||
|
||||
void free_p() {
|
||||
|
@ -36,6 +38,8 @@ int main() {
|
|||
free(s);
|
||||
Test* t = new Test(42);
|
||||
delete t;
|
||||
t = new (std::nothrow) Test(42);
|
||||
delete t;
|
||||
int err = mi_posix_memalign(&p1,32,60);
|
||||
if (!err) free(p1);
|
||||
free(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue