Added "new" inline operators to memory regions.
This commit is contained in:
parent
066c14009b
commit
6b7ba50e17
@ -34,4 +34,12 @@ public:
|
||||
virtual ~memory_region();
|
||||
};
|
||||
|
||||
inline void *operator new(size_t size, memory_region ®ion) {
|
||||
return region.malloc(size);
|
||||
}
|
||||
|
||||
inline void *operator new(size_t size, memory_region *region) {
|
||||
return region->malloc(size);
|
||||
}
|
||||
|
||||
#endif /* MEMORY_REGION_H */
|
||||
|
Loading…
Reference in New Issue
Block a user