Skip to content

Commit

Permalink
Added "new" inline operators to memory regions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbebenita committed Sep 8, 2010
1 parent 066c140 commit 6b7ba50
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/rt/memory_region.h
Expand Up @@ -34,4 +34,12 @@ class memory_region {
virtual ~memory_region();
};

inline void *operator new(size_t size, memory_region &region) {
return region.malloc(size);
}

inline void *operator new(size_t size, memory_region *region) {
return region->malloc(size);
}

#endif /* MEMORY_REGION_H */

0 comments on commit 6b7ba50

Please sign in to comment.