klee
MemoryManager.h
Go to the documentation of this file.
1//===-- MemoryManager.h -----------------------------------------*- C++ -*-===//
2//
3// The KLEE Symbolic Virtual Machine
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef KLEE_MEMORYMANAGER_H
11#define KLEE_MEMORYMANAGER_H
12
13#include <cstddef>
14#include <set>
15#include <cstdint>
16
17namespace llvm {
18class Value;
19}
20
21namespace klee {
22class MemoryObject;
23class ArrayCache;
24
26private:
27 typedef std::set<MemoryObject *> objects_ty;
30
33 size_t spaceSize;
34
35public:
38
43 MemoryObject *allocate(uint64_t size, bool isLocal, bool isGlobal,
44 const llvm::Value *allocSite, size_t alignment);
45 MemoryObject *allocateFixed(uint64_t address, uint64_t size,
46 const llvm::Value *allocSite);
47 void deallocate(const MemoryObject *mo);
48 void markFreed(MemoryObject *mo);
49 ArrayCache *getArrayCache() const { return arrayCache; }
50
51 /*
52 * Returns the size used by deterministic allocation in bytes
53 */
55};
56
57} // End klee namespace
58
59#endif /* KLEE_MEMORYMANAGER_H */
Provides an interface for creating and destroying Array objects.
Definition: ArrayCache.h:31
MemoryObject * allocateFixed(uint64_t address, uint64_t size, const llvm::Value *allocSite)
size_t getUsedDeterministicSize()
void deallocate(const MemoryObject *mo)
ArrayCache * getArrayCache() const
Definition: MemoryManager.h:49
void markFreed(MemoryObject *mo)
std::set< MemoryObject * > objects_ty
Definition: MemoryManager.h:27
MemoryObject * allocate(uint64_t size, bool isLocal, bool isGlobal, const llvm::Value *allocSite, size_t alignment)
ArrayCache *const arrayCache
Definition: MemoryManager.h:29
MemoryManager(ArrayCache *arrayCache)
Definition: main.cpp:291