forked from github/verilator
parent
4773a1e77c
commit
cef0105dfc
@ -242,7 +242,7 @@ public: // But only for verilated*.cpp
|
||||
s_s.m_fdps.resize(31);
|
||||
std::fill(s_s.m_fdps.begin(), s_s.m_fdps.end(), (FILE*)0);
|
||||
s_s.m_fdFreeMct.resize(30);
|
||||
std::iota(s_s.m_fdFreeMct.begin(), s_s.m_fdFreeMct.end(), 1);
|
||||
for (int i = 0, id = 1; i < s_s.m_fdFreeMct.size(); i++, id++) { s_s.m_fdFreeMct[i] = id; }
|
||||
}
|
||||
~VerilatedImp() {}
|
||||
|
||||
@ -472,7 +472,9 @@ public: // But only for verilated*.cpp
|
||||
s_s.m_fdps.resize(start + excess);
|
||||
std::fill(s_s.m_fdps.begin() + start, s_s.m_fdps.end(), (FILE*)0);
|
||||
s_s.m_fdFree.resize(excess);
|
||||
std::iota(s_s.m_fdFree.begin(), s_s.m_fdFree.end(), start);
|
||||
for (int i = 0, id = start; i < s_s.m_fdFree.size(); i++, id++) {
|
||||
s_s.m_fdFree[i] = id;
|
||||
}
|
||||
}
|
||||
IData idx = s_s.m_fdFree.back();
|
||||
s_s.m_fdFree.pop_back();
|
||||
|
Loading…
Reference in New Issue
Block a user