/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* * The storage stream provides an internal buffer that can be filled by a * client using a single output stream. One or more independent input streams * can be created to read the data out non-destructively. The implementation * uses a segmented buffer internally to avoid realloc'ing of large buffers, * with the attendant performance loss and heap fragmentation.
*/
mozilla::Mutex mMutex{"nsStorageStream"};
nsSegmentedBuffer* mSegmentedBuffer MOZ_GUARDED_BY(mMutex) = nullptr; // All segments, except possibly the last, are of this size. Must be // power-of-2
uint32_t mSegmentSize MOZ_GUARDED_BY(mMutex) = 0; // log2(mSegmentSize)
uint32_t mSegmentSizeLog2 MOZ_GUARDED_BY(mMutex) = 0; // true, if an un-Close'ed output stream exists bool mWriteInProgress MOZ_GUARDED_BY(mMutex) = false; // Last segment # in use, -1 initially
int32_t mLastSegmentNum MOZ_GUARDED_BY(mMutex) = -1; // Pointer to next byte to be written char* mWriteCursor MOZ_GUARDED_BY(mMutex) = nullptr; // Pointer to one byte after end of segment containing the write cursor char* mSegmentEnd MOZ_GUARDED_BY(mMutex) = nullptr; // Maximum number of bytes which may be written to the stream
uint32_t mMaxLogicalLength MOZ_GUARDED_BY(mMutex) = 0; // Number of bytes written to stream
uint32_t mLogicalLength MOZ_GUARDED_BY(mMutex) = 0; // number of input streams actively reading a segment.
uint32_t mActiveSegmentBorrows MOZ_GUARDED_BY(mMutex) = 0;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.