Functions | |
winx_volume_region * | find_first_free_region (udefrag_job_parameters *jp, ULONGLONG min_lcn, ULONGLONG min_length, ULONGLONG *max_length) |
Searches for free space region starting at the beginning of the volume. | |
winx_volume_region * | find_last_free_region (udefrag_job_parameters *jp, ULONGLONG min_lcn, ULONGLONG min_length, ULONGLONG *max_length) |
Searches for free space region starting at the end of the volume. | |
winx_volume_region * | find_matching_free_region (udefrag_job_parameters *jp, ULONGLONG start_lcn, ULONGLONG min_length, int preferred_position) |
Searches for best matching free space region. | |
winx_volume_region * | find_largest_free_region (udefrag_job_parameters *jp) |
Searches for largest free space region. | |
int | create_file_blocks_tree (udefrag_job_parameters *jp) |
Creates and initializes the binary tree of all file blocks. | |
int | add_block_to_file_blocks_tree (udefrag_job_parameters *jp, winx_file_info *file, winx_blockmap *block) |
Adds a file block to the binary tree of all file blocks. | |
int | remove_block_from_file_blocks_tree (udefrag_job_parameters *jp, winx_blockmap *block) |
Removes a file block from the binary tree of all file blocks. | |
void | destroy_file_blocks_tree (udefrag_job_parameters *jp) |
Destroys the binary tree of all file blocks. | |
winx_blockmap * | find_first_block (udefrag_job_parameters *jp, ULONGLONG *min_lcn, int flags, winx_file_info **first_file) |
Searches for the first movable file block after the specified cluster on the volume. | |
winx_volume_region* find_first_free_region | ( | udefrag_job_parameters * | jp, |
ULONGLONG | min_lcn, | ||
ULONGLONG | min_length, | ||
ULONGLONG * | max_length | ||
) |
Searches for free space region starting at the beginning of the volume.
[in] | jp | job parameters structure. |
[in] | min_lcn | minimum LCN of region. |
[in] | min_length | minimum length of region, in clusters. |
[out] | max_length | length of the biggest region found. |
winx_volume_region* find_last_free_region | ( | udefrag_job_parameters * | jp, |
ULONGLONG | min_lcn, | ||
ULONGLONG | min_length, | ||
ULONGLONG * | max_length | ||
) |
Searches for free space region starting at the end of the volume.
[in] | jp | job parameters structure. |
[in] | min_lcn | minimum LCN of region. |
[in] | min_length | minimum length of region, in clusters. |
[out] | max_length | length of the biggest region found. |
winx_volume_region* find_matching_free_region | ( | udefrag_job_parameters * | jp, |
ULONGLONG | start_lcn, | ||
ULONGLONG | min_length, | ||
int | preferred_position | ||
) |
Searches for best matching free space region.
[in] | jp | job parameters structure. |
[in] | start_lcn | a point which divides disk into two parts (see below). |
[in] | min_length | minimal accepted length of the region, in clusters. |
[in] | preferred_position | one of the FIND_MATCHING_RGN_xxx constants: FIND_MATCHING_RGN_FORWARD - region after the start_lcn preferred FIND_MATCHING_RGN_BACKWARD - region before the start_lcn preferred FIND_MATCHING_RGN_ANY - any region accepted |
winx_volume_region* find_largest_free_region | ( | udefrag_job_parameters * | jp | ) |
int create_file_blocks_tree | ( | udefrag_job_parameters * | jp | ) |
Creates and initializes the binary tree of all file blocks.
Definition at line 230 of file search.c.
References destroy_file_blocks_tree().
int add_block_to_file_blocks_tree | ( | udefrag_job_parameters * | jp, |
winx_file_info * | file, | ||
winx_blockmap * | block | ||
) |
Adds a file block to the binary tree of all file blocks.
Definition at line 255 of file search.c.
References destroy_file_blocks_tree().
int remove_block_from_file_blocks_tree | ( | udefrag_job_parameters * | jp, |
winx_blockmap * | block | ||
) |
winx_blockmap* find_first_block | ( | udefrag_job_parameters * | jp, |
ULONGLONG * | min_lcn, | ||
int | flags, | ||
winx_file_info ** | first_file | ||
) |
Searches for the first movable file block after the specified cluster on the volume.
[in] | jp | job parameters. |
[in,out] | min_lcn | pointer to variable containing minimum LCN - file blocks below it will be ignored. |
[in] | flags | one of SKIP_xxx flags defined in udefrag.h |
[out] | first_file | pointer to variable receiving information about the file the first block belongs to. |
Definition at line 350 of file search.c.
References destroy_file_blocks_tree().