gatelib
2.1
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
include
common
g_cont_HeapSimple.h
1
#pragma once
2
3
#include "g_cont_HeapAbstract.h"
4
5
namespace
g
6
{
7
namespace
cont
8
{
9
10
// Abstract class for implementation of a heap ( an allocator )
11
// a user can specify a custom Heap by subclassing HeapAbstract into its Heap class, instance it ( as a global variable or a new created object )
12
// and pass it through the heap constructor parameter.
13
// If the heap is not specified, heap standard is used(a call to HeapAbstract::get_FromStandardPolicy () is made).
14
// By default standard policy consists of returning the default Heap, that implements reserve/unreserve/realloc methods with malloc,realloc,free
15
class
G_LIB_ITEM HeapSimple :
public
HeapAbstract
16
{
17
friend
class
HeapAbstract;
18
public
:
19
virtual
~HeapSimple(){}
20
virtual
void
* reserveScalar (
size_t
s );
21
virtual
void
unreserve (
void
* );
22
23
virtual
void
* reserveArray (
size_t
data_capacity ,
size_t
suggested_capacity = EQUAL_TO_CAPACITY );
24
virtual
void
* reallocArray (
void
* ,
size_t
current_data_size ,
size_t
aDataCapacity = EQUAL_TO_CURRENT ,
size_t
suggested_data_capacity = EQUAL_TO_CAPACITY );
25
};
26
27
}
//namespace g
28
}
//namespace cont
g
Definition:
g.mthread.ThreadSimpleEvent.h:5
Generated on Fri Mar 6 2015 16:46:40 for gatelib by
1.8.9.1