File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ type mmappedMemory struct {
39
39
func (m * mmappedMemory ) Reallocate (size uint64 ) []byte {
40
40
com := uint64 (len (m .buf ))
41
41
res := uint64 (cap (m .buf ))
42
- if com < size && size < res {
42
+ if com < size && size <= res {
43
43
// Round up to the page size.
44
44
rnd := uint64 (unix .Getpagesize () - 1 )
45
45
new := (size + rnd ) &^ rnd
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ type virtualMemory struct {
48
48
func (m * virtualMemory ) Reallocate (size uint64 ) []byte {
49
49
com := uint64 (len (m .buf ))
50
50
res := uint64 (cap (m .buf ))
51
- if com < size && size < res {
51
+ if com < size && size <= res {
52
52
// Round up to the page size.
53
53
rnd := uint64 (windows .Getpagesize () - 1 )
54
54
new := (size + rnd ) &^ rnd
You can’t perform that action at this time.
0 commit comments