UltraDefrag Engine Logo UltraDefrag Engine

Architecture - Reference Manual - Guides

Free Space Scan

Functions

NTSTATUS FillFreeSpaceMap (void)
 Dumps the free space on the volume.
void ProcessFreedBlock (ULONGLONG start, ULONGLONG len, UCHAR old_space_state)
 Processes a space block freed by file moving routines.
void AddFreeSpaceBlock (ULONGLONG start, ULONGLONG length)
 Adds a free space block to the free space map.
void TruncateFreeSpaceBlock (ULONGLONG start, ULONGLONG length)
 Cuts the left side of the free space block.
void RemoveFreeSpaceBlock (ULONGLONG start, ULONGLONG len)
 Removes a range of clusters from the free space list.
void DbgPrintFreeSpaceList (void)
 Prints sequenly all the entries of the free space list.

Function Documentation

NTSTATUS FillFreeSpaceMap ( void   ) 

Dumps the free space on the volume.

Returns:
An appropriate NTSTATUS code.
Todo:
This function should return common error codes instead of the status codes.

Definition at line 37 of file freespace.c.

Referenced by Analyze().

void ProcessFreedBlock ( ULONGLONG  start,
ULONGLONG  len,
UCHAR  old_space_state 
)

Processes a space block freed by file moving routines.

Remarks the cluster map and adds the block to the free space map if it is really free.

Parameters:
[in] start the starting cluster of the block.
[in] len the length of the block, in clusters.
[in] old_space_state the state of the block which it has before the freedom.
Note:
On NTFS volumes the freed block is always marked as temporarily allocated by system because on NTFS the volume checkpoints mechanism exists which really frees the space only during the next volume analysis.

Definition at line 125 of file freespace.c.

References AddFreeSpaceBlock(), and RemarkBlock().

Referenced by MoveTheFile(), and MoveTheUnfragmentedFile().

void AddFreeSpaceBlock ( ULONGLONG  start,
ULONGLONG  length 
)

Adds a free space block to the free space map.

Parameters:
[in] start the starting cluster of the block.
[in] length the length of the block, in clusters.

Definition at line 147 of file freespace.c.

Referenced by ProcessFreedBlock(), and RemoveFreeSpaceBlock().

void TruncateFreeSpaceBlock ( ULONGLONG  start,
ULONGLONG  length 
)

Cuts the left side of the free space block.

Parameters:
[in] start the starting cluster of the block.
[in] length the length of the cluster chain to be cut, in clusters.
Note:
If length parameter is equal to the free space block length this function marks the block as zero length block.

Definition at line 225 of file freespace.c.

Referenced by MoveTheFile(), and MoveTheUnfragmentedFile().

void RemoveFreeSpaceBlock ( ULONGLONG  start,
ULONGLONG  len 
)

Removes a range of clusters from the free space list.

Parameters:
[in] start the starting cluster of the block.
[in] len the length of the block, in clusters.

Definition at line 247 of file freespace.c.

References AddFreeSpaceBlock().

Referenced by ProcessMftSpace().


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