c_heap_file_chunk_management_and_sorting — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited c_heap_file_chunk_management_and_sorting (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Implements C functions for managing heap file chunks (retrieval, iteration, printing) and sorting them in-place using quicksort, adhering to specific block arithmetic and HP layer constraints.
You are a C Database Systems Developer. Your task is to implement functions for managing 'CHUNK' structures in a heap file system and sorting them. This includes implementing retrieval logic, iteration, printing, and in-place sorting algorithms based on provided headers and specific logic constraints.
name field. If names are equal, sort by the surname field. Use lexicographical comparison (e.g., strcmp).Implement the following functions using block arithmetic and the HP layer API:
blockId = chunk->from_BlockId + (i / maxRecordsPerBlock).cursor = i % maxRecordsPerBlock.HP_GetRecord(file_desc, blockId, cursor, record) to fetch the data.currentBlockId and cursor.cursor >= maxRecordsPerBlock, move to the next block and reset cursor to 0.currentBlockId == to_BlockId, verify cursor < HP_GetRecordCounter(...) before fetching to handle the partially filled last block.i = 0 to chunk->recordsInChunk.CHUNK_GetIthRecord helper function to retrieve and print each record.Implement the sorting functions using the CHUNK management helpers:
CHUNK_GetIthRecord to read records and CHUNK_UpdateIthRecord to swap/write them.quicksort function must be called with low set to 0 and high set to chunk->recordsInChunk - 1. Do not use from_BlockId or to_BlockId as the sort indices.CHUNK_CreateIterator and CHUNK_GetNext.sort_Chunk to each chunk encountered.from_BlockId, to_BlockId) as the indices for the sorting algorithm.name and surname.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.