MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / CodeHolder_reset_sections

Function CodeHolder_reset_sections

lib/asmjit/asmjit/core/codeholder.cpp:160–172  ·  view source on GitHub ↗

Reset sections.

Source from the content-addressed store, hash-verified

158
159// Reset sections.
160static ASMJIT_INLINE void CodeHolder_reset_sections(CodeHolder* self, ResetPolicy reset_policy) noexcept {
161 // Reset all sections except the first one (.text section).
162 uint32_t from_section = reset_policy == ResetPolicy::kHard ? 0u : 1u;
163 uint32_t section_count = self->_sections._size;
164
165 for (uint32_t i = from_section; i < section_count; i++) {
166 Section* section = self->_sections[i];
167
168 Section_release_buffer(section);
169 section->_buffer._data = nullptr;
170 section->_buffer._capacity = 0;
171 }
172}
173
174// Reset arena and all containers using it.
175static ASMJIT_INLINE void CodeHolder_reset_containers(CodeHolder* self, ResetPolicy reset_policy) noexcept {

Callers 2

~CodeHolderMethod · 0.85

Calls 1

Section_release_bufferFunction · 0.85

Tested by

no test coverage detected