1 #ifndef __JLANG__JRAM__ 
    2 #define __JLANG__JRAM__ 
   16 namespace JPP { 
using namespace JLANG; }
 
   47       const std::size_t size = this->size();
 
   51       iterator q = this->begin();
 
   55       for ( ; q != this->end(); buffer += 
BLOCK_SIZE, ++q) {
 
   67     JRAM(
const std::size_t block_size,
 
   68          const std::size_t number_of_blocks = 65536) :
 
  123       return *(this->end());
 
  145       sort(this->begin(), this->end());
 
  147       vector<unsigned char*>::iterator __end = 
memory.end();
 
  149       for (vector<unsigned char*>::iterator 
i = 
memory.begin(); 
i != __end; ) {
 
  151         iterator p = lower_bound(this->begin(), this->end(), *
i);
 
  156             ((
unsigned char*) (*q) - (
unsigned char*) *p) == (
int) (
BLOCK_SIZE * (numberOfBlocks - 1))) {
 
  158           iter_swap(
i, --__end);
 
void * allocate()
Allocate memory. 
 
JRAM(const std::size_t block_size, const std::size_t number_of_blocks=65536)
Constructor. 
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance. 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
const std::size_t BLOCK_SIZE
 
JRAM & operator=(const JRAM &)
 
void addMemory()
Add memory. 
 
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter. 
 
long long int getFreeRAM()
Get total free RAM. 
 
const std::size_t numberOfBlocks
 
std::vector< unsigned char * > memory
 
long long int getTotalRAM()
Get total used RAM. 
 
void gc()
Run garbage collector. 
 
Memory management for small objects. 
 
void free(void *p)
Deallocate memory.