aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc.h
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-12 07:36:23 -0400
committerRuss Cox <rsc@golang.org>2014-09-12 07:36:23 -0400
commita7c6d89166fd7bf6c9af6013cbfaa21971ba28f0 (patch)
treeb79bc2df78ba0baccfbf368804da726105aa1a58 /src/runtime/malloc.h
parentf0d44dbeaf28d157f8eba85ec9f9bffdc84ce3e0 (diff)
downloadgo-a7c6d89166fd7bf6c9af6013cbfaa21971ba28f0.tar.xz
runtime: tell the truth about BitVector type
Dmitriy changed all the execution to interpret the BitVector as an array of bytes. Update the declaration and generation of the bitmaps to match, to avoid problems on big-endian machines. LGTM=khr R=khr CC=dvyukov, golang-codereviews https://golang.org/cl/140570044
Diffstat (limited to 'src/runtime/malloc.h')
-rw-r--r--src/runtime/malloc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/malloc.h b/src/runtime/malloc.h
index b6856768db..60b87da78c 100644
--- a/src/runtime/malloc.h
+++ b/src/runtime/malloc.h
@@ -589,14 +589,14 @@ bool runtime·freespecial(Special *s, void *p, uintptr size, bool freed);
struct BitVector
{
int32 n; // # of bits
- uint32 *data;
+ uint8 *bytedata;
};
typedef struct StackMap StackMap;
struct StackMap
{
int32 n; // number of bitmaps
int32 nbit; // number of bits in each bitmap
- uint32 data[];
+ uint8 bytedata[]; // bitmaps, each starting on a 32-bit boundary
};
// Returns pointer map data for the given stackmap index
// (the index is encoded in PCDATA_StackMapIndex).