[DEBUG] correct Allocator.hpp missing
This commit is contained in:
parent
a42db849c4
commit
2a02c0c0be
@ -4,7 +4,7 @@
|
|||||||
* @license MPL v2.0 (see license file)
|
* @license MPL v2.0 (see license file)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#include <etk/types.hpp>
|
#include <etk/Allocator.hpp>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
/*
|
/*
|
||||||
void* operator new (size_t size) {
|
void* operator new (size_t size) {
|
||||||
@ -26,14 +26,3 @@ void operator delete[] (void* ptr) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// it is define bu generic "include <new>" ==> no double define of placement new
|
|
||||||
#ifndef _NEW
|
|
||||||
// Default placement versions of operator new (use char* instead of void* to permit no multiple definition).
|
|
||||||
inline void* operator new(size_t, char* _p) throw() {
|
|
||||||
ETK_VECTOR_DEBUG("plop\n");
|
|
||||||
return _p;
|
|
||||||
}
|
|
||||||
inline void operator delete (void*, char*) throw() {
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
18
etk/Allocator.hpp
Normal file
18
etk/Allocator.hpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/** @file
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @copyright 2017, Edouard DUPIN, all right reserved
|
||||||
|
* @license MPL v2.0 (see license file)
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
#include <etk/types.hpp>
|
||||||
|
|
||||||
|
// it is define bu generic "include <new>" ==> no double define of placement new
|
||||||
|
#ifndef _NEW
|
||||||
|
// Default placement versions of operator new (use char* instead of void* to permit no multiple definition).
|
||||||
|
inline void* operator new(size_t, char* _p) throw() {
|
||||||
|
return _p;
|
||||||
|
}
|
||||||
|
inline void operator delete (void*, char*) throw() {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
@ -40,6 +40,7 @@ def configure(target, my_module):
|
|||||||
])
|
])
|
||||||
|
|
||||||
my_module.add_header_file([
|
my_module.add_header_file([
|
||||||
|
'etk/Allocator.hpp',
|
||||||
'etk/types.hpp',
|
'etk/types.hpp',
|
||||||
'etk/stdTools.hpp',
|
'etk/stdTools.hpp',
|
||||||
'etk/Buffer.hpp',
|
'etk/Buffer.hpp',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user