aboutsummaryrefslogtreecommitdiff
path: root/src/dedo.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/dedo.go')
-rw-r--r--src/dedo.go18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/dedo.go b/src/dedo.go
index e93beb3..1e3c115 100644
--- a/src/dedo.go
+++ b/src/dedo.go
@@ -313,9 +313,6 @@ const (
)
var (
- // Are unaligned load/stores broken on this arch?
- brokenUnaligned = false
-
// trySolo is a special sentinel error value used for signaling that a
// transaction function should be re-run. It should never be seen by
// callers.
@@ -411,11 +408,6 @@ var (
// ErrPageIDRequired is returned when a required page id is not specified.
ErrPageIDRequired = errors.New("page id required")
-
- // File handlers for the various profiles.
- cpuprofile *os.File = nil
- memprofile *os.File = nil
- blockprofile *os.File = nil
)
@@ -551,17 +543,9 @@ func (b *Bucket) Bucket(name []byte) *Bucket {
func (b *Bucket) openBucket(value []byte) *Bucket {
var child = newBucket(b.tx)
- // If unaligned load/stores are broken on this arch and value is
- // unaligned simply clone to an aligned byte array.
- unaligned := brokenUnaligned && uintptr(unsafe.Pointer(&value[0]))&3 != 0
-
- if unaligned {
- value = cloneBytes(value)
- }
-
// If this is a writable transaction then we need to copy the bucket entry.
// Read-only transactions can point directly at the mmap entry.
- if b.tx.writable && !unaligned {
+ if b.tx.writable {
child.ref = &bucket{}
*child.ref = *(*bucket)(unsafe.Pointer(&value[0]))
} else {