/*
- * $Id$
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
*/
#ifndef SQUID_IPC_MEM_PAGE_STACK_H
#define SQUID_IPC_MEM_PAGE_STACK_H
#include "ipc/AtomicWord.h"
+#include "ipc/mem/FlexibleArray.h"
namespace Ipc
{
const Offset theCapacity; ///< stack capacity, i.e. theItems size
const size_t thePageSize; ///< page size, used to calculate shared memory size
/// lower bound for the number of free pages (may get negative!)
- AtomicWordT<Offset> theSize;
+ Atomic::WordT<Offset> theSize;
/// last readable item index; just a hint, not a guarantee
- AtomicWordT<Offset> theLastReadable;
+ Atomic::WordT<Offset> theLastReadable;
/// first writable item index; just a hint, not a guarantee
- AtomicWordT<Offset> theFirstWritable;
+ Atomic::WordT<Offset> theFirstWritable;
- typedef AtomicWordT<Value> Item;
- Item theItems[]; ///< page number storage
+ typedef Atomic::WordT<Value> Item;
+ Ipc::Mem::FlexibleArray<Item> theItems; ///< page number storage
};
} // namespace Mem
} // namespace Ipc
#endif // SQUID_IPC_MEM_PAGE_STACK_H
+