mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 15:16:42 +00:00
wip
This commit is contained in:
parent
1e7090cc8e
commit
3d8060e302
1 changed files with 8 additions and 0 deletions
|
@ -34,6 +34,10 @@ func (a *arena) sizeBytes() int {
|
|||
}
|
||||
|
||||
func (a *arena) copyBytes(b []byte) []byte {
|
||||
if len(b) == 0 {
|
||||
return b
|
||||
}
|
||||
|
||||
ab := a.b
|
||||
abLen := len(ab)
|
||||
ab = append(ab, b...)
|
||||
|
@ -53,6 +57,10 @@ func (a *arena) copyString(s string) string {
|
|||
}
|
||||
|
||||
func (a *arena) newBytes(size int) []byte {
|
||||
if size <= 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
ab := a.b
|
||||
abLen := len(ab)
|
||||
ab = bytesutil.ResizeWithCopyMayOverallocate(ab, abLen+size)
|
||||
|
|
Loading…
Reference in a new issue