implement delete operator in c++ runtime
authorKristina <tinab@hush.ai>
Tue, 6 Sep 2016 19:26:20 +0000 (20:26 +0100)
committerKristina <tinab@hush.ai>
Tue, 6 Sep 2016 19:26:20 +0000 (20:26 +0100)
arm_chainloader/minicxx.cc

index 9688513..5c2459b 100644 (file)
@@ -29,6 +29,14 @@ void* operator new (size_t sz) {
        return malloc(sz);\r
 }\r
 \r
+void operator delete (void* ptr) {\r
+       free(ptr);\r
+}\r
+\r
+void operator delete[] (void* ptr) {\r
+       free(ptr);\r
+}\r
+\r
 extern "C" void __cxa_pure_virtual() {\r
        panic("__cxa_pure_virtual!");\r
 }
\ No newline at end of file
This page took 0.023158 seconds and 4 git commands to generate.