aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_pr.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-07 17:56:31 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-07 17:56:31 +0000
commitdecf459805cdb3f6811f979df4831bc2ce9a2858 (patch)
tree7d7644446cf8bd315185f2598993d0b4ce21cabb /src/fs/gnunet-service-fs_pr.h
parent605c3946e573ab1446e8210b3b7f6cccd5c1ba03 (diff)
downloadgnunet-decf459805cdb3f6811f979df4831bc2ce9a2858.tar.gz
gnunet-decf459805cdb3f6811f979df4831bc2ce9a2858.zip
-reducing memory use for PendingRequestData by 30% by not allocating space for target/namespace hash codes unless the request needs/has them
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.h')
-rw-r--r--src/fs/gnunet-service-fs_pr.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h
index 10bc5c1f3..2a5fed29d 100644
--- a/src/fs/gnunet-service-fs_pr.h
+++ b/src/fs/gnunet-service-fs_pr.h
@@ -88,14 +88,16 @@ struct GSF_PendingRequestData
88 88
89 /** 89 /**
90 * Namespace to query, only set if the type is SBLOCK. 90 * Namespace to query, only set if the type is SBLOCK.
91 * Allocated after struct only if needed. Do not free!
91 */ 92 */
92 struct GNUNET_HashCode namespace; 93 const struct GNUNET_HashCode *namespace;
93 94
94 /** 95 /**
95 * Identity of a peer hosting the content, only set if 96 * Identity of a peer hosting the content, only set if
96 * 'has_target' is GNUNET_YES. 97 * 'has_target' is GNUNET_YES.
98 * Allocated after struct only if needed. Do not free!
97 */ 99 */
98 struct GNUNET_PeerIdentity target; 100 const struct GNUNET_PeerIdentity *target;
99 101
100 /** 102 /**
101 * Fields for the plan module to track a DLL with the request. 103 * Fields for the plan module to track a DLL with the request.
@@ -164,11 +166,6 @@ struct GSF_PendingRequestData
164 unsigned int results_found; 166 unsigned int results_found;
165 167
166 /** 168 /**
167 * Is the 'target' value set to a valid peer identity?
168 */
169 int has_target;
170
171 /**
172 * Has this request been started yet (local/p2p operations)? Or are 169 * Has this request been started yet (local/p2p operations)? Or are
173 * we still constructing it? 170 * we still constructing it?
174 */ 171 */