TlSF Alloctor: use less memory for --gc:arc (#13280)

This commit is contained in:
Andreas Rumpf 2020-01-28 17:09:48 +01:00 • committed by GitHub
commit be795bbf1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 103 additions and 80 deletions

View file

@ -122,7 +122,7 @@ proc nimAsgnStrV2(a: var NimStringV2, b: NimStringV2) {.compilerRtl.} =
a.len = b.len
a.p = b.p
else:
if isLiteral(a) or (a.p.cap and not strlitFlag) < b.len:
if isLiteral(a) or (a.p.cap and not strlitFlag) < b.len:
# we have to allocate the 'cap' here, consider
# 'let y = newStringOfCap(); var x = y'
# on the other hand... These get turned into moves now.