36 #include "../api_core.h"
40 class CL_BlockAllocator_Impl;
79 void *allocate(
int size);
87 template<
typename Type>
90 Type *data = (Type *) allocate(
sizeof(Type));
91 CL_System::call_constructor<Type>(data);
98 template<
typename Type,
typename P1>
101 Type *data = (Type *) allocate(
sizeof(Type));
102 CL_System::call_constructor<Type, P1>(data, p1);
110 template<
typename Type,
typename P1,
typename P2>
113 Type *data = (Type *) allocate(
sizeof(Type));
114 CL_System::call_constructor<Type, P1, P2>(data, p1, p2);
123 template<
typename Type,
typename P1,
typename P2,
typename P3>
126 Type *data = (Type *) allocate(
sizeof(Type));
127 CL_System::call_constructor<Type, P1, P2, P3>(data, p1, p2, p3);
137 template<
typename Type,
typename P1,
typename P2,
typename P3,
typename P4>
140 Type *data = (Type *) allocate(
sizeof(Type));
141 CL_System::call_constructor<Type, P1, P2, P3, P4>(data, p1, p2, p3, p4);
152 template<
typename Type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5>
153 Type *
new_obj(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
155 Type *data = (Type *) allocate(
sizeof(Type));
156 CL_System::call_constructor<Type, P1, P2, P3, P4, P5>(data, p1, p2, p3, p4, p5);
168 template<
typename Type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6>
169 Type *
new_obj(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
171 Type *data = (Type *) allocate(
sizeof(Type));
172 CL_System::call_constructor<Type, P1, P2, P3, P4, P5, P6>(data, p1, p2, p3, p4, p5, p6);
185 template<
typename Type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7>
186 Type *
new_obj(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
188 Type *data = (Type *) allocate(
sizeof(Type));
189 CL_System::call_constructor<Type, P1, P2, P3, P4, P5, P6, P7>(data, p1, p2, p3, p4, p5, p6, p7);
196 template<
typename Type>
208 CL_SharedPtr<CL_BlockAllocator_Impl> impl;
232 void operator delete(
void *data,
size_t size);