1 #ifndef __JLANG__JRAM__
2 #define __JLANG__JRAM__
15 namespace JPP {
using namespace JLANG; }
41 throw JException(
"JRAM::allocate(): not enough space in memory.");
46 const std::size_t size = this->size();
50 iterator q = this->begin();
54 for ( ; q != this->end(); buffer +=
BLOCK_SIZE, ++q) {
66 JRAM(
const std::size_t block_size,
67 const std::size_t number_of_blocks = 65536) :
122 return *(this->end());
144 sort(this->begin(), this->end());
146 vector<unsigned char*>::iterator __end =
memory.end();
148 for (vector<unsigned char*>::iterator i =
memory.begin(); i != __end; ) {
150 iterator p = lower_bound(this->begin(), this->end(), *i);
157 iter_swap(i, --__end);