Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
dart::Malloc Class Reference

#include <growable_array.h>

Inheritance diagram for dart::Malloc:
dart::AllStatic

Static Public Member Functions

template<class T >
static TAlloc (intptr_t len)
 
template<class T >
static TRealloc (T *old_array, intptr_t old_len, intptr_t new_len)
 
template<class T >
static void Free (T *old_array, intptr_t old_len)
 

Detailed Description

Definition at line 255 of file growable_array.h.

Member Function Documentation

◆ Alloc()

template<class T >
static T * dart::Malloc::Alloc ( intptr_t  len)
inlinestatic

Definition at line 258 of file growable_array.h.

258 {
259 return reinterpret_cast<T*>(dart::malloc(len * sizeof(T)));
260 }
void * malloc(size_t size)
Definition allocation.cc:19
#define T

◆ Free()

template<class T >
static void dart::Malloc::Free ( T old_array,
intptr_t  old_len 
)
inlinestatic

Definition at line 268 of file growable_array.h.

268 {
269 free(old_array);
270 }

◆ Realloc()

template<class T >
static T * dart::Malloc::Realloc ( T old_array,
intptr_t  old_len,
intptr_t  new_len 
)
inlinestatic

Definition at line 263 of file growable_array.h.

263 {
264 return reinterpret_cast<T*>(dart::realloc(old_array, new_len * sizeof(T)));
265 }
void * realloc(void *ptr, size_t size)
Definition allocation.cc:27

The documentation for this class was generated from the following file: