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
This commit is contained in:
Roger Dingledine
2005-10-29 19:13:48 +00:00
parent bf2be9abd7
commit 44b3f3060a
5 changed files with 16 additions and 3 deletions
+1
View File
@@ -200,6 +200,7 @@ command_process_create_cell(cell_t *cell, connection_t *conn)
circ->purpose = CIRCUIT_PURPOSE_OR;
circ->state = CIRCUIT_STATE_ONIONSKIN_PENDING;
if (cell->command == CELL_CREATE) {
circ->onionskin = tor_malloc(ONIONSKIN_CHALLENGE_LEN);
memcpy(circ->onionskin, cell->payload, ONIONSKIN_CHALLENGE_LEN);
/* hand it off to the cpuworkers, and then return */