Skip to content

Commit

Permalink
[gc_heap] Try NO_GC_HACK to speed up parse-errors under oil-native
Browse files Browse the repository at this point in the history
Let's see if we get 1114 passing spec-cpp tests.
  • Loading branch information
Andy C committed Nov 29, 2021
1 parent 2f7736b commit 5e5390c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/mycpp.sh
Expand Up @@ -180,6 +180,9 @@ compile() {
;;
esac

# Avoid memset(). TODO: avoid this hack!
flags="$flags -D NO_GC_HACK"

# flags are split
$CXX $flags \
-I . \
Expand Down
5 changes: 5 additions & 0 deletions mycpp/gc_heap.cc
Expand Up @@ -38,7 +38,12 @@ void Space::Init(int space_size) {
begin_ = static_cast<char*>(malloc(space_size));
#endif
size_ = space_size;

#ifndef NO_GC_HACK
// When not collecting, we need a huge 400 MiB heap. Try to save startup
// time by not doing this.
Clear();
#endif
}

void Space::Free() {
Expand Down

0 comments on commit 5e5390c

Please sign in to comment.