Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkMalloc.cpp
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3
5
7
8void* sk_calloc_throw(size_t count, size_t elemSize) {
9 return sk_calloc_throw(SkSafeMath::Mul(count, elemSize));
10}
11
12void* sk_malloc_throw(size_t count, size_t elemSize) {
13 return sk_malloc_throw(SkSafeMath::Mul(count, elemSize));
14}
15
16void* sk_realloc_throw(void* buffer, size_t count, size_t elemSize) {
17 return sk_realloc_throw(buffer, SkSafeMath::Mul(count, elemSize));
18}
19
20void* sk_malloc_canfail(size_t count, size_t elemSize) {
21 return sk_malloc_canfail(SkSafeMath::Mul(count, elemSize));
22}
int count
void * sk_realloc_throw(void *buffer, size_t count, size_t elemSize)
Definition SkMalloc.cpp:16
void * sk_malloc_throw(size_t count, size_t elemSize)
Definition SkMalloc.cpp:12
void * sk_malloc_canfail(size_t count, size_t elemSize)
Definition SkMalloc.cpp:20
void * sk_calloc_throw(size_t count, size_t elemSize)
Definition SkMalloc.cpp:8
static size_t Mul(size_t x, size_t y)
static const uint8_t buffer[]