(file) Return to ArrayRep.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/ArrayRep.h between version 1.6 and 1.7

version 1.6, 2003/10/22 14:26:01 version 1.7, 2003/12/04 21:31:11
Line 32 
Line 32 
 #ifndef Pegasus_ArrayRep_h #ifndef Pegasus_ArrayRep_h
 #define Pegasus_ArrayRep_h #define Pegasus_ArrayRep_h
  
   #ifdef PEGASUS_OS_OS400
   #include <stdlib.h>
   #endif
   
 #include <new> #include <new>
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Memory.h> #include <Pegasus/Common/Memory.h>
Line 121 
Line 125 
  
     // Create object:     // Create object:
  
   #ifdef PEGASUS_OS_OS400
       // use Terraspace for allocation,
       // bypass 16mb single allocation limit imposed by single store memory model on OS400
       ArrayRep<T>* rep = (ArrayRep<T>*)_C_TS_malloc(sizeof(ArrayRep<T>) + sizeof(T) * initialCapacity);
   #else
     ArrayRep<T>* rep = (ArrayRep<T>*)operator new(     ArrayRep<T>* rep = (ArrayRep<T>*)operator new(
         sizeof(ArrayRep<T>) + sizeof(T) * initialCapacity);         sizeof(ArrayRep<T>) + sizeof(T) * initialCapacity);
   #endif
     rep->size = size;     rep->size = size;
     rep->capacity = initialCapacity;     rep->capacity = initialCapacity;
  
Line 136 
Line 145 
     if (rep)     if (rep)
     {     {
         Destroy(rep->data(), rep->size);         Destroy(rep->data(), rep->size);
   #ifdef PEGASUS_OS_OS400
           _C_TS_free(rep);  // Terraspace deallocation
   #else
         operator delete(rep);         operator delete(rep);
   #endif
         return;         return;
     }     }
 } }


Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2