MCPcopy Create free account
hub / github.com/ZDoom/Raze / reserveBuffer

Method reserveBuffer

libraries/asmjit/asmjit/base/codeholder.cpp:346–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346Error CodeHolder::reserveBuffer(CodeBuffer* cb, size_t n) noexcept {
347 size_t capacity = cb->getCapacity();
348 if (n <= capacity) return kErrorOk;
349
350 if (cb->isFixedSize())
351 return DebugUtils::errored(kErrorCodeTooLarge);
352
353 // We must sync, as mentioned in `growBuffer()` as well.
354 if (_cgAsm) _cgAsm->sync();
355
356 return CodeHolder_reserveInternal(this, cb, n);
357}
358
359// ============================================================================
360// [asmjit::CodeHolder - Labels & Symbols]

Callers

nothing calls this directly

Calls 5

erroredFunction · 0.85
isFixedSizeMethod · 0.80
getCapacityMethod · 0.45
syncMethod · 0.45

Tested by

no test coverage detected