43 #define RALLOCSTACK_H 1
74 : m_next_scope(RAllocStack::s_innermost_scope),
81 RAllocStack::s_innermost_scope =
this;
88 RAllocStack::trim(m_saved_size);
90 RAllocStack::s_innermost_scope = m_next_scope;
145 return s_stack->size();
148 typedef std::pair<size_t, void*> Pair;
149 typedef std::stack<Pair, std::vector<Pair> > Stack;
150 static Stack* s_stack;
152 static Scope* s_innermost_scope;
160 static void cleanup();
163 static void initialize();
167 static void trim(
size_t new_size);
201 char*
R_alloc(
size_t num_elts,
int elt_size);
227 return static_cast<void*
>(
R_alloc(num_elts, elt_size));
243 char*
S_alloc(
long num_elts,
int elt_size);
265 char*
S_realloc(
char *prev_block,
long new_sz,
long old_sz,
int elt_size);
300 void vmaxset(
const void* stack_sizep);
304 size_t stack_size =
static_cast<const char*
>(stack_sizep)
305 - static_cast<const char*>(0);
314 #endif // RALLOCSTACK_H