Skip to content

Commit

Permalink
Fix free when destroying symmetric graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
Laxman Dhulipala committed Dec 2, 2024
1 parent a661cf6 commit 0b012b8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions CODEOWNERS

This file was deleted.

1 change: 1 addition & 0 deletions gbbs/edge_map_blocked.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ struct emhelper {
auto& vec = perthread_blocks[group_id * kThreadBlockStride];
if (vec.size() == 0) { // alloc new
block_ptr = gbbs::new_array_no_init<em_data_block>(1);
std::cout << "Allocating!" << std::endl;
vec.emplace_back(block_ptr);
block_ptr->block_size = 0;
} else {
Expand Down
4 changes: 2 additions & 2 deletions gbbs/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ struct symmetric_graph {
v_data, n, sym_m,
[=]() {
gbbs::free_array(v_data, n);
gbbs::free_array(neighbors, m);
gbbs::free_array(neighbors, sym_m);
},
(neighbor_type *)neighbors);
}
Expand Down Expand Up @@ -393,7 +393,7 @@ struct symmetric_ptr_graph {

return symmetric_ptr_graph<vertex_type, W>(n, sym_m, vertices, [=]() {
gbbs::free_array(vertices, n);
gbbs::free_array(neighbors, m);
gbbs::free_array(neighbors, sym_m);
});
}

Expand Down
1 change: 0 additions & 1 deletion gbbs/unit_tests/graph_test_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ symmetric_ptr_graph<symmetric_vertex, gbbs::empty>
MakeUnweightedSymmetricPtrGraph(
const uintE num_vertices, const std::unordered_set<UndirectedEdge>& edges) {
using Edge = std::tuple<uintE, uintE, gbbs::empty>;
using Weight = gbbs::empty;

constexpr gbbs::empty weight{};
sequence<Edge> edge_sequence(edges.size());
Expand Down

0 comments on commit 0b012b8

Please sign in to comment.