rmawatson
53a897731e
this is allow custom allocator for obj-api structs/tables. (#4520)
added "native_custom_alloc" attribute to tables/structs, eg.
table parent_table( native_custom_alloc:"custom_alloc_name" ) {
...
}
with a custom allocator defined as
template <typename T> class custom_alloc_name : public std::allocator<T> {
public:
typedef T* pointer;
template <class U>
struct rebind {
typedef custom_alloc_name<U> other;
};
pointer allocate(const std::size_t n) {
return ....;
}
void deallocate(T* ptr, std::size_t n) {
...
}
custom_alloc_name() throw() {}
template <class U> custom_alloc_name(const custom_alloc_name<U>&) throw() {}
};
};
2017-12-01 09:15:41 -08:00
..
2017-08-25 11:47:19 -07:00
2016-05-25 17:25:40 -07:00
2017-06-26 09:07:02 -07:00
2017-10-05 14:07:42 -07:00
2017-12-01 09:15:41 -08:00
2017-10-06 16:08:00 -07:00
2017-11-20 09:19:35 -08:00
2017-09-22 16:17:02 -07:00
2017-09-22 16:17:02 -07:00
2017-08-24 09:35:54 -07:00
2017-08-24 09:35:54 -07:00
2017-04-21 09:29:42 -07:00
2017-05-24 16:26:57 -07:00
2017-08-11 09:24:36 -07:00
2017-11-06 10:20:22 -08:00
2017-08-24 09:35:54 -07:00
2017-11-06 10:20:22 -08:00
2017-05-10 16:45:08 -07:00
2017-11-16 10:08:41 -08:00
2017-08-24 13:39:45 -07:00
2017-08-24 13:39:45 -07:00
2017-12-01 09:15:41 -08:00
2017-11-06 10:20:22 -08:00
2017-06-07 13:56:49 -07:00
2017-06-07 13:56:49 -07:00
2017-08-31 08:56:04 -07:00
2017-08-24 09:35:54 -07:00
2017-07-24 14:19:49 -07:00
2017-11-06 10:20:22 -08:00
2017-08-24 09:35:54 -07:00
2016-03-29 14:56:09 +11:00
2017-08-11 09:24:36 -07:00
2017-08-11 09:24:36 -07:00
2017-10-06 08:34:07 -07:00
2017-05-24 16:26:57 -07:00
2017-11-16 14:21:11 -08:00
2017-08-11 09:24:36 -07:00
2017-08-11 09:24:36 -07:00
2015-10-14 23:07:40 -07:00