X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=src%2Flibcaptive%2Fcc%2Fsharedcachemap-priv.h;h=7a7cf07da3485264e983d372ccc062b66bf43f60;hb=a2dd38f86df22c46ae18f3ad7d9850eaacb02b92;hp=f2179a5127569bd8470ed5c3a89462bcb0e5d6ff;hpb=a6ee04687f6a9ddc2b1a4ab6ac9ec98838cae067;p=captive.git diff --git a/src/libcaptive/cc/sharedcachemap-priv.h b/src/libcaptive/cc/sharedcachemap-priv.h index f2179a5..7a7cf07 100644 --- a/src/libcaptive/cc/sharedcachemap-priv.h +++ b/src/libcaptive/cc/sharedcachemap-priv.h @@ -42,7 +42,7 @@ struct _CaptiveSharedCacheMapObject { 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 @@ -54,11 +54,19 @@ struct _CaptiveSharedCacheMapObject { * 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;