summaryrefslogtreecommitdiff
path: root/src/sna/sna_damage.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-03 19:15:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-03 21:35:03 +0000
commit7ff42e9c83cdb17660a64901497704b38032af8c (patch)
tree8a0840c00391a7c67e3417a4a023d781fb50a3b7 /src/sna/sna_damage.c
parent4652a20de5fee0d5d1a8baadc4a93b6a93525564 (diff)
sna/damage: Mark the box as packed so that the embedded_box is aligned correctly
valgrind was complaining about an overlapping memcpy on a 64-bit platform as gcc padded the sna_damage_box to 28 bytes... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_damage.c')
-rw-r--r--src/sna/sna_damage.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sna/sna_damage.c b/src/sna/sna_damage.c
index 44677eda..7431f39e 100644
--- a/src/sna/sna_damage.c
+++ b/src/sna/sna_damage.c
@@ -48,6 +48,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* cheapy discard no-ops.
*/
+struct sna_damage_box {
+ struct list list;
+ int size;
+} __attribute__((packed));
+
static struct sna_damage *__freed_damage;
static inline bool region_is_singular(RegionRec *r)
@@ -182,11 +187,6 @@ static struct sna_damage *_sna_damage_create(void)
return damage;
}
-struct sna_damage_box {
- struct list list;
- int size;
-};
-
static bool _sna_damage_create_boxes(struct sna_damage *damage,
int count)
{