mem_node.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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_MEM_NODE_H
10#define SQUID_MEM_NODE_H
11
12#include "base/Range.h"
13#include "defines.h"
14#include "mem/forward.h"
15#include "StoreIOBuffer.h"
16
18{
20
21public:
22 static size_t InUseCount();
23 static size_t StoreMemSize();
24
25 mem_node(int64_t);
26 ~mem_node();
27 size_t space() const;
28 int64_t start() const;
29 int64_t end() const;
31 bool contains (int64_t const &location) const;
32 bool canAccept (int64_t const &location) const;
33 bool operator < (mem_node const & rhs) const;
34 /* public */
36 /* Private */
39};
40
41inline std::ostream &
42operator << (std::ostream &os, mem_node &aNode)
43{
44 os << aNode.nodeBuffer.range();
45 return os;
46}
47
48void memNodeWriteComplete(void *);
49
50#endif /* SQUID_MEM_NODE_H */
51
Definition: Range.h:19
Range< int64_t > range() const
Definition: StoreIOBuffer.h:42
StoreIOBuffer nodeBuffer
Definition: mem_node.h:35
MEMPROXY_CLASS(mem_node)
Range< int64_t > dataRange() const
Definition: mem_node.cc:80
size_t space() const
Definition: mem_node.cc:86
bool operator<(mem_node const &rhs) const
Definition: mem_node.cc:111
char data[SM_PAGE_SIZE]
Definition: mem_node.h:37
static size_t StoreMemSize()
Definition: mem_node.cc:61
~mem_node()
Definition: mem_node.cc:51
bool canAccept(int64_t const &location) const
Definition: mem_node.cc:102
bool contains(int64_t const &location) const
Definition: mem_node.cc:92
static size_t InUseCount()
Definition: mem_node.cc:55
int64_t end() const
Definition: mem_node.cc:74
mem_node(int64_t)
Definition: mem_node.cc:44
int64_t start() const
Definition: mem_node.cc:67
bool write_pending
Definition: mem_node.h:38
#define SM_PAGE_SIZE
Definition: defines.h:65
std::ostream & operator<<(std::ostream &os, mem_node &aNode)
Definition: mem_node.h:42
void memNodeWriteComplete(void *)
Definition: mem_node.cc:37

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors