Bug 1249174 (part 5) - Remove the useless BLK_HDR::size field. r=khuey.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 23 Feb 2016 05:34:33 +1100
changeset 322329 69bc807d8b8a36604f313626071fa4d624e8605d
parent 322328 f4296d24c1f357f6b45acd50e76ea056afe3e2cc
child 322330 6a5f30460690b5089f648e8a38eed27d52a8d597
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1249174
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1249174 (part 5) - Remove the useless BLK_HDR::size field. r=khuey.
xpcom/typelib/xpt/xpt_arena.cpp
--- a/xpcom/typelib/xpt/xpt_arena.cpp
+++ b/xpcom/typelib/xpt/xpt_arena.cpp
@@ -14,21 +14,19 @@
 #include "mozilla/MemoryReporting.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 
 /****************************************************/
 
 /* Block header for each block in the arena */
-typedef struct BLK_HDR BLK_HDR;
 struct BLK_HDR
 {
     BLK_HDR *next;
-    size_t   size;
 };
 
 #define XPT_MIN_BLOCK_SIZE 32
 
 /* XXX this is lame. Should clone the code to do this bitwise */
 #define ALIGN_RND(s,a) ((a)==1?(s):((((s)+(a)-1)/(a))*(a)))
 
 struct XPTArena
@@ -113,19 +111,16 @@ XPT_ArenaMalloc(XPTArena *arena, size_t 
             arena->space = 0;
             return NULL;
         }
 
         /* link block into the list of blocks for use when we destroy */
         new_block->next = arena->first;
         arena->first = new_block;
 
-        /* save other block header info */
-        new_block->size = new_space;
-
         /* set info for current block */
         arena->next  = ((uint8_t*)new_block) + block_header_size;
         arena->space = new_space - block_header_size;
 
 #ifdef DEBUG
         /* mark block for corruption check */
         memset(arena->next, 0xcd, arena->space);
 #endif