UltraDefrag Engine Logo UltraDefrag Engine

Architecture - Reference Manual - Guides

Cluster Map

Functions

int AllocateMap (int size)
 Allocates the cluster map.
int GetMap (char *dest, int cluster_map_size)
 Retrieves the cluster map.
void MarkAllSpaceAsFree0 (void)
 Marks all space in cluster map as free.
void MarkAllSpaceAsSystem1 (void)
 Marks all space in cluster map as system.
unsigned char GetFileSpaceState (PFILENAME pfn)
 Retrieves a space state of the file.
void MarkFileSpace (PFILENAME pfn, int old_space_state)
 Remarks a range of clusters belonging to the file in the cluster map.
void RemarkFileSpaceAsSystem (PFILENAME pfn)
 Remarks a range of clusters belonging to the file as system clusters in the cluster map.
void RemarkBlock (ULONGLONG start, ULONGLONG len, int space_state, int old_space_state)
 Remarks a range of clusters in the cluster map.
void FreeMap (void)
 Frees the cluster map.

Function Documentation

int AllocateMap ( int  size  ) 

Allocates the cluster map.

Parameters:
[in] size the number of map cells.
Returns:
Zero for success, negative value otherwise.

Definition at line 48 of file map.c.

References FreeMap().

Referenced by udefrag_kernel_start().

int GetMap ( char *  dest,
int  cluster_map_size 
)

Retrieves the cluster map.

Parameters:
[out] dest pointer to buffer receiving the map.
[in] cluster_map_size the number of map cells.
Returns:
Zero for success, negative value otherwise.

Definition at line 98 of file map.c.

Referenced by udefrag_kernel_get_statistic().

void MarkAllSpaceAsFree0 ( void   ) 

Marks all space in cluster map as free.

All cells of the map are marked as containing a single cluster.

Definition at line 142 of file map.c.

Referenced by Analyze().

void MarkAllSpaceAsSystem1 ( void   ) 

Marks all space in cluster map as system.

All cells of the map are marked as containing a real number of clusters per cell.

Definition at line 157 of file map.c.

Referenced by Analyze().

unsigned char GetFileSpaceState ( PFILENAME  pfn  ) 

Retrieves a space state of the file.

Parameters:
[in] pfn pointer to the FILENAME structure containing information about the file.
Returns:
A space state of the file.

Definition at line 187 of file map.c.

References IsMft().

Referenced by DefragmentFreeSpaceLTR(), DefragmentFreeSpaceRTL(), MarkFileSpace(), MoveTheFile(), MoveTheUnfragmentedFile(), and RemarkFileSpaceAsSystem().

void MarkFileSpace ( PFILENAME  pfn,
int  old_space_state 
)

Remarks a range of clusters belonging to the file in the cluster map.

Parameters:
[in] pfn pointer to the FILENAME structure containing information about the file.
[in] old_space_state the previous state of the marked space.

Definition at line 347 of file map.c.

References GetFileSpaceState(), and RemarkBlock().

Referenced by AddFile(), and BuildPaths().

void RemarkFileSpaceAsSystem ( PFILENAME  pfn  ) 

Remarks a range of clusters belonging to the file as system clusters in the cluster map.

Parameters:
[in] pfn pointer to the FILENAME structure containing information about the file.

Definition at line 363 of file map.c.

References GetFileSpaceState(), and RemarkBlock().

Referenced by IsFileLocked(), and RemarkWellKnownLockedFiles().

void RemarkBlock ( ULONGLONG  start,
ULONGLONG  len,
int  space_state,
int  old_space_state 
)

Remarks a range of clusters in the cluster map.

Parameters:
[in] start the starting cluster of the block.
[in] len the length of the block, in clusters.
[in] space_state the new state of the marked space.
[in] old_space_state the previous state of the marked space.

Definition at line 383 of file map.c.

References offset.

Referenced by DefragmentFreeSpaceLTR(), DefragmentFreeSpaceRTL(), MarkFileSpace(), MoveTheFile(), MoveTheUnfragmentedFile(), ProcessFreedBlock(), ProcessMftSpace(), and RemarkFileSpaceAsSystem().


Generated on Sat May 29 23:06:46 2010 for UltraDefrag Engine by doxygen 1.6.2