diff options
author | jailletc36 <jailletc36@13f79535-47bb-0310-9956-ffa450edef68> | 2023-02-14 07:56:50 +0000 |
---|---|---|
committer | jailletc36 <jailletc36@13f79535-47bb-0310-9956-ffa450edef68> | 2023-02-14 07:56:50 +0000 |
commit | 87c8321e094af6973c7c7404998b2b6792646954 (patch) | |
tree | f435af16c03b93f00109dde14f55044d23f4dc8e /include/apr_buckets.h | |
parent | 7c64283f9548ec787e991d522074de1c89a42f55 (diff) | |
download | libapr-87c8321e094af6973c7c7404998b2b6792646954.tar.gz |
Re-order the fields of 'struct apr_bucket_file' to avoid a hole and some padding.
Before the patch, pahole states that:
struct apr_bucket_file {
apr_bucket_refcount refcount; /* 0 4 */
/* XXX 4 bytes hole, try to pack */
apr_file_t * fd; /* 8 8 */
apr_pool_t * readpool; /* 16 8 */
int can_mmap; /* 24 4 */
/* XXX 4 bytes hole, try to pack */
apr_size_t read_size; /* 32 8 */
/* size: 40, cachelines: 1, members: 5 */
/* sum members: 32, holes: 2, sum holes: 8 */
/* last cacheline: 40 bytes */
};
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907634 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_buckets.h')
-rw-r--r-- | include/apr_buckets.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/apr_buckets.h b/include/apr_buckets.h index 2e522c765..f7f6a39e5 100644 --- a/include/apr_buckets.h +++ b/include/apr_buckets.h @@ -620,16 +620,16 @@ typedef struct apr_bucket_file apr_bucket_file; struct apr_bucket_file { /** Number of buckets using this memory */ apr_bucket_refcount refcount; - /** The file this bucket refers to */ - apr_file_t *fd; - /** The pool into which any needed structures should - * be created while reading from this file bucket */ - apr_pool_t *readpool; #if APR_HAS_MMAP /** Whether this bucket should be memory-mapped if * a caller tries to read from it */ int can_mmap; #endif /* APR_HAS_MMAP */ + /** The file this bucket refers to */ + apr_file_t *fd; + /** The pool into which any needed structures should + * be created while reading from this file bucket */ + apr_pool_t *readpool; /** File read block size */ apr_size_t read_size; }; |