SwapMetaOut.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_SRC_STORE_SWAPMETAOUT_H
10#define SQUID_SRC_STORE_SWAPMETAOUT_H
11
12#include "base/HardFun.h"
13#include "store/forward.h"
14
15#include <memory>
16
17// TODO: Use CtoCpp1() from security/LockingPointer.h by moving that into base/ToCpp.h or similar.
20extern "C++" inline void xfree_cpp(const void * const x) { xfree(x); }
21
22// TODO: Move AllocedBuf and xfree_cpp() to src/base/Memory.h or similar.
24using AllocedBuf = std::unique_ptr<void, HardFun<void, const void *, &xfree_cpp> >;
25
26namespace Store {
27
30AllocedBuf PackSwapMeta(const StoreEntry &, size_t &size);
31
32} // namespace Store
33
34#endif /* SQUID_SRC_STORE_SWAPMETAOUT_H */
35
int size
Definition: ModDevPoll.cc:75
void xfree_cpp(const void *const x)
Definition: SwapMetaOut.h:20
std::unique_ptr< void, HardFun< void, const void *, &xfree_cpp > > AllocedBuf
memory allocated by xmalloc() or xcalloc(), to be freed by xfree()
Definition: SwapMetaOut.h:24
AllocedBuf PackSwapMeta(const StoreEntry &, size_t &size)
Definition: SwapMetaOut.cc:77
#define xfree

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors