Use better packing of leak-detective memory_header to align pointers
authorMartin Willi <martin@revosec.ch>
Wed, 25 May 2011 16:32:00 +0000 (18:32 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 25 May 2011 17:56:47 +0000 (19:56 +0200)
src/libstrongswan/utils/leak_detective.c

index 8497a1c..451408a 100644 (file)
@@ -93,11 +93,6 @@ typedef struct memory_tail_t memory_tail_t;
 struct memory_header_t {
 
        /**
-        * Number of bytes following after the header
-        */
-       u_int bytes;
-
-       /**
         * Pointer to previous entry in linked list
         */
        memory_header_t *previous;
@@ -113,6 +108,11 @@ struct memory_header_t {
        backtrace_t *backtrace;
 
        /**
+        * Number of bytes following after the header
+        */
+       u_int32_t bytes;
+
+       /**
         * magic bytes to detect bad free or heap underflow, MEMORY_HEADER_MAGIC
         */
        u_int32_t magic;