14 #ifndef SIMPLEALLOCATOR_H 15 #define SIMPLEALLOCATOR_H 37 INLINE
bool is_empty()
const;
38 INLINE
size_t get_total_size()
const;
39 INLINE
size_t get_max_size()
const;
40 INLINE
void set_max_size(
size_t max_size);
41 INLINE
size_t get_contiguous()
const;
45 void output(std::ostream &out)
const;
46 void write(std::ostream &out)
const;
50 INLINE
bool do_is_empty()
const;
54 virtual void changed_contiguous();
93 size_t start,
size_t size);
109 INLINE
size_t get_start()
const;
110 INLINE
size_t get_size()
const;
111 INLINE
bool is_free()
const;
113 INLINE
size_t get_max_size()
const;
114 INLINE
bool realloc(
size_t size);
118 void output(std::ostream &out)
const;
121 INLINE
void do_free();
122 INLINE
size_t do_get_max_size()
const;
123 INLINE
bool do_realloc(
size_t size);
133 INLINE std::ostream &operator << (std::ostream &out,
const SimpleAllocator &obj) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An implementation of a very simple block allocator.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A standard mutex, or mutual exclusion lock.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This just stores the pointers to implement a doubly-linked list of some kind of object.
A single block as returned from SimpleAllocator::alloc().
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.