diff options
author | Roger Dingledine <arma@torproject.org> | 2005-10-29 19:13:48 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-10-29 19:13:48 +0000 |
commit | 44b3f3060a863a9297fdbe722bd7bf8c00e70653 (patch) | |
tree | 788a754468f090ce105ccdd897774d3a0c1703fe /src/or/cpuworker.c | |
parent | bf2be9abd75c2057e2f8f75c0480c2699c6299a5 (diff) | |
download | tor-44b3f3060a863a9297fdbe722bd7bf8c00e70653.tar.gz tor-44b3f3060a863a9297fdbe722bd7bf8c00e70653.zip |
make circ->onionskin a pointer, not a static array. moria2 was using
125000 circuit_t's after it had been up for a few weeks, which translates
to 20+ megs of wasted space.
svn:r5333
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r-- | src/or/cpuworker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index bc31faaf8d..d5f2e45998 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -428,6 +428,7 @@ assign_to_cpuworker(connection_t *cpuworker, uint8_t question_type, if (question_type == CPUWORKER_TASK_ONION) { circ = task; + tor_assert(circ->onionskin); if (num_cpuworkers_busy == num_cpuworkers) { debug(LD_OR,"No idle cpuworkers. Queuing."); @@ -453,6 +454,7 @@ assign_to_cpuworker(connection_t *cpuworker, uint8_t question_type, connection_write_to_buf((char*)&question_type, 1, cpuworker); connection_write_to_buf(tag, sizeof(tag), cpuworker); connection_write_to_buf(circ->onionskin, ONIONSKIN_CHALLENGE_LEN, cpuworker); + tor_free(circ->onionskin); } return 0; } |