consider these two functions
Records *initRecords(Graph *graph, int startVertex) {
    Records *records = malloc(sizeof(Records));
    records->numVertices = graph->numVertices;
    records->heap = initHeap(graph, startVertex);
    records->finished = malloc(sizeof(bool) * graph->numVertices);
    records->predecessors = malloc(sizeof(int) * graph->numVertices);
    records->tree = malloc(sizeof(Edge) * (graph->numVertices - 1));
    records->numTreeEdges = 0;
    for (int i = 0; i < graph->numVertices; i++) {
        records->finished[i] = false;
        records->predecessors[i] = NOTHING;
    }
    return records;
}

MinHeap *initHeap(Graph *graph, int startVertex) {
    MinHeap *heap = newMinHeap(graph->numVertices);
    for (int i = 0; i < graph->numVertices; i++) {
        if (i == startVertex) {
            insert(heap, newEdge(startVertex, startVertex, 0));
        } else {
            insert(heap, newEdge(startVertex, i, INT_MAX));
        }
    }
    return heap;
}