Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
allocation.cc
Go to the documentation of this file.
1// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
6
7#include "platform/assert.h"
8
9namespace dart {
10
11void* calloc(size_t n, size_t size) {
12 void* result = ::calloc(n, size);
13 if (result == nullptr) {
15 }
16 return result;
17}
18
19void* malloc(size_t size) {
20 void* result = ::malloc(size);
21 if (result == nullptr) {
23 }
24 return result;
25}
26
27void* realloc(void* ptr, size_t size) {
28 void* result = ::realloc(ptr, size);
29 if (result == nullptr) {
31 }
32 return result;
33}
34
35} // namespace dart
#define OUT_OF_MEMORY()
Definition assert.h:250
GAsyncResult * result
void * malloc(size_t size)
Definition allocation.cc:19
void * calloc(size_t n, size_t size)
Definition allocation.cc:11
void * realloc(void *ptr, size_t size)
Definition allocation.cc:27