diff options
| author | Nils Maier <maierman@web.de> | 2013-11-26 02:59:51 +0100 |
|---|---|---|
| committer | Nils Maier <maierman@web.de> | 2013-12-09 15:41:43 +0100 |
| commit | 2db0c81fc8067d73230fcbffc90bd7ad1f9c07b0 (patch) | |
| tree | a6c37eaa4de5ef4c8b4e982cb7d87c1f6ac5bf3b /src/HttpSkipResponseCommand.h | |
| parent | 1323048ab1a254510e32d47f5549f4e30d273e5a (diff) | |
Stuff memory holes
Padding changes on x86_64:
- RequestGroup: 29 -> 5 bytes
- DownloadContext: 25 -> 1 bytes
- Cookie: 20 -> 4 bytes
- Command: 8 -> 0 bytes (affects many derived as well)
- HttpRequest: 20 -> 4 bytes
- DownloadCommand: 18 -> 2 bytes
- TimeBasedCommand: 14 -> 6 bytes
- AbstractCommand: 13 -> 5 bytes
- HttpSkipResponseCommand: 12 -> 4 bytes
- FileEntry: 10 -> 2 bytes
- DownloadResult: 15 -> 7 bytes
- UriStruct: 12 -> 4 bytes
- Piece: 11 -> 3 bytes
- BitfieldMan -> 11 -> 3 bytes
Diffstat (limited to 'src/HttpSkipResponseCommand.h')
| -rw-r--r-- | src/HttpSkipResponseCommand.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/HttpSkipResponseCommand.h b/src/HttpSkipResponseCommand.h index 6d13ef76..dff34f43 100644 --- a/src/HttpSkipResponseCommand.h +++ b/src/HttpSkipResponseCommand.h @@ -45,11 +45,7 @@ class StreamFilter; class HttpSkipResponseCommand : public AbstractCommand { private: - std::shared_ptr<HttpConnection> httpConnection_; - - std::unique_ptr<HttpResponse> httpResponse_; - - std::unique_ptr<StreamFilter> streamFilter_; + // hole from AbstractCommand (5 bytes on x86_64) bool sinkFilterOnly_; @@ -57,21 +53,27 @@ private: int64_t receivedBytes_; + std::shared_ptr<HttpConnection> httpConnection_; + + std::unique_ptr<HttpResponse> httpResponse_; + + std::unique_ptr<StreamFilter> streamFilter_; + bool processResponse(); void poolConnection() const; + protected: virtual bool executeInternal() CXX11_OVERRIDE; + public: - HttpSkipResponseCommand - (cuid_t cuid, - const std::shared_ptr<Request>& req, - const std::shared_ptr<FileEntry>& fileEntry, - RequestGroup* requestGroup, - const std::shared_ptr<HttpConnection>& httpConnection, - std::unique_ptr<HttpResponse> httpResponse, - DownloadEngine* e, - const std::shared_ptr<SocketCore>& s); + HttpSkipResponseCommand(cuid_t cuid, const std::shared_ptr<Request>& req, + const std::shared_ptr<FileEntry>& fileEntry, + RequestGroup* requestGroup, + const std::shared_ptr<HttpConnection>& httpConnection, + std::unique_ptr<HttpResponse> httpResponse, + DownloadEngine* e, + const std::shared_ptr<SocketCore>& s); virtual ~HttpSkipResponseCommand(); |
