#include <Alloc.hh>
Inheritance diagram for clAlloc:
Public Member Functions | |
clAlloc () | |
Constructor; initializes empty allocation. | |
clAlloc (const clAlloc &CopySrc) | |
Copy constructor; copies instance. | |
clAlloc (long lAllocSize) | |
Constructor; allocates specified amount of memory. | |
~clAlloc () | |
Destructor; frees allocated memory block. | |
void * | Size (long lAllocSize) |
Allocate specified amount of memory, previously allocated block is freed before allocating new one. | |
void * | Resize (long lAllocSize) |
Resize memory block to specified size. | |
void | Free () |
Free allocated memory block. | |
void * | GetPtr () const |
Get pointer to allocated block. | |
long | GetSize () const |
Get size of allocation. | |
void | Lock () |
Lock memory block (prevent paging out). | |
void | UnLock () |
Unlock memory block (allow paging out). | |
void | Copy (const clAlloc &Src) |
Copy specified memory block to this instance. | |
void | CopyTo (clAlloc &Dest) |
Copy contents of this instance to specified memory block. | |
clAlloc | GetCopy () |
Return copy of this instance. | |
operator char * () const | |
Return pointer to memory block. | |
operator unsigned char * () const | |
operator short * () const | |
operator unsigned short * () const | |
operator int * () const | |
operator unsigned int * () const | |
operator long * () const | |
operator unsigned long * () const | |
operator float * () const | |
operator double * () const | |
operator long double * () const | |
operator void * () const | |
operator void * () | |
clAlloc & | operator= (const clAlloc &Src) |
Self explanatory. | |
Protected Attributes | |
bool | bLocked |
long | lSize |
void * | vpPtr |
Mainly to avoid memory leaks and to simplify pointer typecasts.
Definition at line 48 of file Alloc.hh.
|
Constructor; initializes empty allocation.
|
|
Copy constructor; copies instance.
Definition at line 67 of file Alloc.hh. References Copy(). |
|
Constructor; allocates specified amount of memory.
|
|
Destructor; frees allocated memory block.
Definition at line 87 of file Alloc.hh. References Free(). |
|
Allocate specified amount of memory, previously allocated block is freed before allocating new one.
Definition at line 97 of file Alloc.hh. References ALLOC_ALIGNMENT, Free(), lSize, and vpPtr. Referenced by clAlloc(), Copy(), clDSPOp::FFTInitialize(), clDSPOp::FIRAllocate(), clDSPOp::FIRFilter(), clIIRDecimator::Get(), clFIRDecimator::Get(), clFFTDecimator::Get(), clReBuffer::GetPtr(), clHankel::InitAbel(), clRecInterpolator::Initialize(), clRecDecimator::Initialize(), clHankel::Initialize(), clFlipBand::Initialize(), clFilter::Initialize(), clIIRInterpolator::Put(), clFIRInterpolator::Put(), and clFFTInterpolator::Put(). |
|
Resize memory block to specified size.
Definition at line 124 of file Alloc.hh. References ALLOC_ALIGNMENT, bLocked, Free(), lSize, UnLock(), and vpPtr. Referenced by clReBufferT< TDSPVector_t >::CheckSize(), and clReBuffer::CheckSize(). |
|
Free allocated memory block. It is not an error to free already freed or non-allocated block. Definition at line 161 of file Alloc.hh. References bLocked, lSize, UnLock(), and vpPtr. Referenced by clReBufferT< TDSPVector_t >::Clear(), clReBuffer::Clear(), Copy(), clDSPOp::FFTUninitialize(), clDSPOp::FIRFree(), Resize(), Size(), clHankel::UninitAbel(), clRecInterpolator::Uninitialize(), clRecDecimator::Uninitialize(), clIIRInterpolator::Uninitialize(), clIIRDecimator::Uninitialize(), clHankel::Uninitialize(), clFlipBand::Uninitialize(), clFIRInterpolator::Uninitialize(), clFIRDecimator::Uninitialize(), clFilter::Uninitialize(), clFFTInterpolator::Uninitialize(), clFFTDecimator::Uninitialize(), and ~clAlloc(). |
|
Get pointer to allocated block.
Definition at line 180 of file Alloc.hh. References vpPtr. Referenced by clReBufferT< TDSPVector_t >::CopyGet(), and clHankel::DoAbel(). |
|
Get size of allocation.
Definition at line 187 of file Alloc.hh. References lSize. Referenced by clReBufferT< TDSPVector_t >::CheckSize(), and clReBuffer::CheckSize(). |
|
Lock memory block (prevent paging out).
|
|
Unlock memory block (allow paging out).
Definition at line 204 of file Alloc.hh. |
|
Copy specified memory block to this instance.
Definition at line 219 of file Alloc.hh. References Free(), lSize, Size(), and vpPtr. Referenced by clAlloc(), CopyTo(), GetCopy(), clReBuffer::operator=(), and operator=(). |
|
Copy contents of this instance to specified memory block.
Definition at line 231 of file Alloc.hh. References Copy(). |
|
Return copy of this instance.
Definition at line 240 of file Alloc.hh. References Copy(). |
|
Return pointer to memory block.
Definition at line 250 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 253 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 256 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 259 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 262 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 265 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 268 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 271 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 274 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 277 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 280 of file Alloc.hh. References vpPtr. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 283 of file Alloc.hh. References vpPtr. |
|
Definition at line 285 of file Alloc.hh. References vpPtr. |
|
Self explanatory.
Definition at line 294 of file Alloc.hh. References Copy(). |
|
Definition at line 51 of file Alloc.hh. Referenced by clAlloc(), Free(), Lock(), Resize(), and UnLock(). |
|
Definition at line 52 of file Alloc.hh. Referenced by clAlloc(), Copy(), Free(), GetSize(), Lock(), Resize(), Size(), and UnLock(). |
|
Definition at line 53 of file Alloc.hh. Referenced by clAlloc(), Copy(), Free(), GetPtr(), Lock(), operator char *(), operator double *(), operator float *(), operator int *(), operator long *(), operator long double *(), operator short *(), operator unsigned char *(), operator unsigned int *(), operator unsigned long *(), operator unsigned short *(), operator void *(), Resize(), Size(), and UnLock(). |