Remove post-mmap resizing

This commit is contained in:
Ben Johnson 2016-09-01 09:18:52 -06:00
parent e130d99a18
commit 0879bab148
No known key found for this signature in database
GPG key ID: 81741CD251883081
2 changed files with 2 additions and 3 deletions

View file

@ -711,8 +711,7 @@ func (cmd *InspectCommand) Run() error {
t := time.Now()
fmt.Fprintf(cmd.Stderr, "unmarshaling bitmap...")
bm := roaring.NewBitmap()
buf := (*[0x7FFFFFFF]byte)(unsafe.Pointer(&data[0]))[:fi.Size()]
if err := bm.UnmarshalBinary(buf); err != nil {
if err := bm.UnmarshalBinary(data); err != nil {
return err
}
fmt.Fprintf(cmd.Stderr, " (%s)\n", time.Since(t))

View file

@ -191,7 +191,7 @@ func (f *Fragment) openStorage() error {
}
// Attach the mmap file to the bitmap.
data := (*[0x7FFFFFFF]byte)(unsafe.Pointer(&f.storageData[0]))[:fi.Size()]
data := f.storageData
if err := f.storage.UnmarshalBinary(data); err != nil {
return fmt.Errorf("unmarshal storage: file=%s, err=%s", f.file.Name(), err)
}