Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
base
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
4
#include "
include/private/base/SkMalloc.h
"
5
6
#include "
src/base/SkSafeMath.h
"
7
8
void
*
sk_calloc_throw
(
size_t
count
,
size_t
elemSize) {
9
return
sk_calloc_throw
(
SkSafeMath::Mul
(
count
, elemSize));
10
}
11
12
void
*
sk_malloc_throw
(
size_t
count
,
size_t
elemSize) {
13
return
sk_malloc_throw
(
SkSafeMath::Mul
(
count
, elemSize));
14
}
15
16
void
*
sk_realloc_throw
(
void
*
buffer
,
size_t
count
,
size_t
elemSize) {
17
return
sk_realloc_throw
(
buffer
,
SkSafeMath::Mul
(
count
, elemSize));
18
}
19
20
void
*
sk_malloc_canfail
(
size_t
count
,
size_t
elemSize) {
21
return
sk_malloc_canfail
(
SkSafeMath::Mul
(
count
, elemSize));
22
}
count
int count
Definition
FontMgrTest.cpp:50
sk_realloc_throw
void * sk_realloc_throw(void *buffer, size_t count, size_t elemSize)
Definition
SkMalloc.cpp:16
sk_malloc_throw
void * sk_malloc_throw(size_t count, size_t elemSize)
Definition
SkMalloc.cpp:12
sk_malloc_canfail
void * sk_malloc_canfail(size_t count, size_t elemSize)
Definition
SkMalloc.cpp:20
sk_calloc_throw
void * sk_calloc_throw(size_t count, size_t elemSize)
Definition
SkMalloc.cpp:8
SkMalloc.h
SkSafeMath.h
SkSafeMath::Mul
static size_t Mul(size_t x, size_t y)
Definition
SkSafeMath.cpp:16
buffer
static const uint8_t buffer[]
Definition
fl_pixel_buffer_texture_test.cc:44
Generated on Fri Apr 26 2024 06:16:32 for Flutter Engine by
1.9.8