Blender  V2.93
util_guarded_allocator.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2015 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 #include "util/util_stats.h"
19 
21 
23 
24 /* Internal API. */
25 
26 void util_guarded_mem_alloc(size_t n)
27 {
29 }
30 
31 void util_guarded_mem_free(size_t n)
32 {
34 }
35 
36 /* Public API. */
37 
39 {
40  return global_stats.mem_used;
41 }
42 
44 {
45  return global_stats.mem_peak;
46 }
47 
size_t mem_used
Definition: util_stats.h:48
size_t mem_peak
Definition: util_stats.h:49
@ static_init
Definition: util_stats.h:27
void mem_free(size_t size)
Definition: util_stats.h:42
void mem_alloc(size_t size)
Definition: util_stats.h:36
#define CCL_NAMESPACE_END
size_t util_guarded_get_mem_used()
size_t util_guarded_get_mem_peak()
void util_guarded_mem_free(size_t n)
void util_guarded_mem_alloc(size_t n)
static CCL_NAMESPACE_BEGIN Stats global_stats(Stats::static_init)