Skip to content

Commit

Permalink
Fix regex GC issue
Browse files Browse the repository at this point in the history
  • Loading branch information
arshajii committed Jan 22, 2024
1 parent 539d211 commit 1dcb2a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions codon/runtime/lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ SEQ_FUNC void seq_assert_failed(seq_str_t file, seq_int_t line);

SEQ_FUNC void *seq_alloc(size_t n);
SEQ_FUNC void *seq_alloc_atomic(size_t n);
SEQ_FUNC void *seq_alloc_uncollectable(size_t n);
SEQ_FUNC void *seq_alloc_atomic_uncollectable(size_t n);
SEQ_FUNC void *seq_calloc(size_t m, size_t n);
SEQ_FUNC void *seq_calloc_atomic(size_t m, size_t n);
SEQ_FUNC void *seq_realloc(void *p, size_t newsize, size_t oldsize);
Expand Down
2 changes: 1 addition & 1 deletion codon/runtime/re.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ template <typename KV> struct GCMapAllocator : public std::allocator<KV> {

template <typename KV1> GCMapAllocator(const GCMapAllocator<KV1> &) noexcept {}

KV *allocate(std::size_t n) { return (KV *)seq_alloc(n * sizeof(KV)); }
KV *allocate(std::size_t n) { return (KV *)seq_alloc_uncollectable(n * sizeof(KV)); }

void deallocate(KV *p, std::size_t n) { seq_free(p); }

Expand Down

0 comments on commit 1dcb2a0

Please sign in to comment.