Blender V5.0
BLI_memory_counter.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include "BLI_function_ref.hh"
14#include "BLI_set.hh"
15
17
33
40 private:
41 MemoryCount &count_;
42
43 public:
45
49 void add(const int64_t bytes);
50
60 void add_shared(const ImplicitSharingInfo *sharing_info,
61 const FunctionRef<void(MemoryCounter &shared_memory)> count_fn);
62
67 void add_shared(const ImplicitSharingInfo *sharing_info, const int64_t bytes);
68};
69
70} // namespace blender::memory_counter
long long int int64_t
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
Set< WeakImplicitSharingPtr > handled_shared_data
void add_shared(const ImplicitSharingInfo *sharing_info, const FunctionRef< void(MemoryCounter &shared_memory)> count_fn)
int count