diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-12 14:57:27 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-13 10:58:27 -0700 |
commit | 8ad59edd02a8ea6001f15cd6d92944ae83c88f6d (patch) | |
tree | 3597cf9a764ba9e99779477a70f7bb71848d1a4c /freelist.go | |
parent | Mmap remap. (diff) | |
download | dedo-8ad59edd02a8ea6001f15cd6d92944ae83c88f6d.tar.gz dedo-8ad59edd02a8ea6001f15cd6d92944ae83c88f6d.tar.xz |
API Documentation.
Diffstat (limited to 'freelist.go')
-rw-r--r-- | freelist.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/freelist.go b/freelist.go index cd0bffa..3f5cf1c 100644 --- a/freelist.go +++ b/freelist.go @@ -29,7 +29,7 @@ func (f *freelist) all() []pgid { // If a contiguous block cannot be found then 0 is returned. func (f *freelist) allocate(n int) pgid { var count int - var previd pgid = 0 + var previd pgid for i, id := range f.ids { // Reset count if this is not contiguous. if previd == 0 || previd-id != 1 { @@ -82,7 +82,7 @@ func (f *freelist) read(p *page) { // become free. func (f *freelist) write(p *page) { ids := f.all() - p.flags |= p_freelist + p.flags |= freelistPageFlag p.count = uint16(len(ids)) copy(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[:], ids) } |