/usr/include/cvc3/memory_manager.h is in libcvc3-dev 2.4.1-5.1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | /*****************************************************************************/
/*!
* \file memory_manager.h
*
* Author: Sergey Berezin
*
* Created: Thu Apr 3 16:47:14 2003
*
* <hr>
*
* License to use, copy, modify, sell and/or distribute this software
* and its documentation for any purpose is hereby granted without
* royalty, subject to the terms and conditions defined in the \ref
* LICENSE file provided with this distribution.
*
* <hr>
*
* Class MemoryManager: allocates/deallocates memory for objects of a
* requested size. Some instanced of this class may be specialized to
* a specific object size, and the actual memory may be allocated in
* big chunks, for efficiency.
*
* Typical use of this class is to create
* MemoryManager* mm = new MemoryManagerChunks(sizeof(YourClass));
* where YourClass has operators new and delete redefined:
* void* YourClass::operator new(size_t size, MemoryManager* mm)
* { return mm->newData(size); }
* void YourClass::delete(void*) { } // do not deallocate memory here
* Then, create objects with obj = new(mm) YourClass(), and destroy them with
* delete obj; mm->deleteData(obj);
*/
/*****************************************************************************/
#ifndef _cvc3__memory_manager_h
#define _cvc3__memory_manager_h
namespace CVC3 {
class MemoryManager {
public:
// Destructor
virtual ~MemoryManager() { }
virtual void* newData(size_t size) = 0;
virtual void deleteData(void* d) = 0;
}; // end of class MemoryManager
}
#endif
|