From a7c6d89166fd7bf6c9af6013cbfaa21971ba28f0 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 12 Sep 2014 07:36:23 -0400 Subject: 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 --- src/runtime/malloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/malloc.h') 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). -- cgit v1.3-5-g9baa