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 {
3939func (m * mmappedMemory ) Reallocate (size uint64 ) []byte {
4040 com := uint64 (len (m .buf ))
4141 res := uint64 (cap (m .buf ))
42- if com < size && size < res {
42+ if com < size && size <= res {
4343 // Round up to the page size.
4444 rnd := uint64 (unix .Getpagesize () - 1 )
4545 new := (size + rnd ) &^ rnd
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ type virtualMemory struct {
4848func (m * virtualMemory ) Reallocate (size uint64 ) []byte {
4949 com := uint64 (len (m .buf ))
5050 res := uint64 (cap (m .buf ))
51- if com < size && size < res {
51+ if com < size && size <= res {
5252 // Round up to the page size.
5353 rnd := uint64 (windows .Getpagesize () - 1 )
5454 new := (size + rnd ) &^ rnd
You can’t perform that action at this time.
0 commit comments