X-Git-Url: http://git.jankratochvil.net/?p=captive.git;a=blobdiff_plain;f=src%2Flibcaptive%2Fcc%2Fsharedcachemap-priv.h;h=af2fcacd558ccc9bc967bb5ccf1fae6a910f6c9f;hp=1b353e8a81afdef00a02500cc84d691f8b560708;hb=000196808efeead1b2aee0c3aaa0ef64c11ef335;hpb=bced16e7c4bc3f758f3fde9f8a2dd774277c2605 diff --git a/src/libcaptive/cc/sharedcachemap-priv.h b/src/libcaptive/cc/sharedcachemap-priv.h index 1b353e8..af2fcac 100644 --- a/src/libcaptive/cc/sharedcachemap-priv.h +++ b/src/libcaptive/cc/sharedcachemap-priv.h @@ -54,11 +54,17 @@ 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. */ 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;