gint w32_ref_count;
FILE_OBJECT *FileObject;
- SECTION_OBJECT_POINTERS *SectionObjectPointers;
+ SECTION_OBJECT_POINTERS *SectionObjectPointer;
/* ValidDataLength<=FileSize<=AllocationSize */
/* 'AllocationSize' sets the mmap(2)ed area of buffers of this SharedCacheMap.
* We must reallocate this area if 'AllocationSize' changes and in such case
* as the offsets are usually PAGE_SIZE aligned due to pin-Bcb expectations.
*/
guint64 FileSize; /* ==CC_FILE_SIZES.FileSize.QuadPart */
- /* We use 'FileSize' instead of 'ValidDataLength' as I assume W32
+ /* We use do not use 'ValidDataLength' as I assume W32
* automatically increases 'ValidDataLength' during Cache Manager write operations.
* We do not increase it and therefore it is mostly useless for us.
+ * In some cases (during NTFS mount) there may be also invalid 'ValidDataLength' at all:
+ * CcSetFileSizes(AllocationSize=0x1000000,FileSize=0xf80208,ValidDataLength=0x23b801a0)
*/
guint64 ValidDataLength; /* ==CC_FILE_SIZES.ValidDataLength.QuadPart */
+ /* The real allocation size of 'buffer' and 'pages'.
+ * Maintained by captive_shared_cache_map_object_FileSizes_changed()
+ * to prevent continous reallocation to (n+1) size.
+ * We use (n*2) sizes for logaritmic time complexity.
+ */
+ guint64 alloc_length;
CACHE_MANAGER_CALLBACKS CallBacks;
VOID *LazyWriterContext;
gboolean PinAccess;
- CaptivePrivateBcbMapObject *map;
+ CaptivePrivateBcbMapObject *map; /* 'map' will g_object_ref(CaptiveSharedCacheMapObject). */
GHashTable *pin_hash; /* map: (guint64 *) -> (CaptivePrivateBcbPinObject *) */
gboolean LogHandle_set;
gboolean FlushToLsnRoutine_set;