mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
Restructure the native module
Consolidate all code into the src folder
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include <new>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Override libc++ new implementation
|
||||
* to optimize final build size */
|
||||
|
||||
void* operator new(std::size_t s) { return malloc(s); }
|
||||
void* operator new[](std::size_t s) { return malloc(s); }
|
||||
void operator delete(void *p) { free(p); }
|
||||
void operator delete[](void *p) { free(p); }
|
||||
void* operator new(std::size_t s, const std::nothrow_t&) noexcept { return malloc(s); }
|
||||
void* operator new[](std::size_t s, const std::nothrow_t&) noexcept { return malloc(s); }
|
||||
void operator delete(void *p, const std::nothrow_t&) noexcept { free(p); }
|
||||
void operator delete[](void *p, const std::nothrow_t&) noexcept { free(p); }
|
||||
Reference in New Issue
Block a user