mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 14:09:31 +03:00
15 lines
No EOL
396 B
C++
15 lines
No EOL
396 B
C++
// Issue #981: test overriding allocation in a DLL that is compiled independent of mimalloc.
|
|
// This is imported by the `mimalloc-test-override` project.
|
|
#include <string>
|
|
#include "main-override-dep.h"
|
|
|
|
std::string TestAllocInDll::GetString()
|
|
{
|
|
char* test = new char[128];
|
|
memset(test, 0, 128);
|
|
const char* t = "test";
|
|
memcpy(test, t, 4);
|
|
std::string r = test;
|
|
delete[] test;
|
|
return r;
|
|
} |