"Fossies" - the Fresh Open Source Software Archive

Member "heaplayers-351/allocators/hoard/addlocksuperblockheader.h" (24 Nov 2004, 666 Bytes) of package /linux/misc/old/heaplayers_3_5_1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "addlocksuperblockheader.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef _ADDLOCKSUPERBLOCKHEADER_H_
    2 #define _ADDLOCKSUPERBLOCKHEADER_H_
    3 
    4 #include "addlock.h"
    5 #include "ownerheader.h"
    6 
    7 
    8 // Put a lock in the superblock header.
    9 template <class TheLockType,
   10       class Super,
   11       size_t SuperblockSize,
   12       class SuperblockType,
   13       class HeapType>
   14 class AddLockSuperblockHeader : 
   15   public OwnerHeader<AddLock<TheLockType, Super>, SuperblockType, HeapType> {
   16 public:
   17   typedef OwnerHeader<AddLock<TheLockType, Super>, SuperblockType, HeapType> Header;
   18 
   19   inline AddLockSuperblockHeader (size_t sz)
   20     : Header (sz)
   21   {}
   22 
   23   // Ensure that this header is padded!
   24   char _pad[sizeof(double) - (sizeof(Header) % sizeof(double))];
   25 };
   26 
   27 #endif