Bug #3495

Space blow-up in cxx

Added by Michael Sweatt over 4 years ago. Updated over 4 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


When building a large number of data packets,signing them, and getting the Names.
10M of Names uses 4G of memory.

We determined the cause being that the Names maintain references to their underlying Data, which can be reduced by calling wireEncode().

Discussed locally and determined intentional. Posting here for posterity sake.

Attached is a small code snippet that demonstrates the issue.


memory_test.t.cpp (2.58 KB) memory_test.t.cpp little test Michael Sweatt, 03/02/2016 10:32 AM

Updated by Alex Afanasyev over 4 years ago

I will repeat that this "effect" is intentional.

We may want to provide an explicit method(s) to compress memory usage. Right now, you can simply call Name::wireEncode() which will make a separate memory allocation, releasing the previously referenced buffer.


Updated by Spyros Mastorakis over 4 years ago

Alex, we just filed the bug report, so that all of us are aware of this "property" in order to avoid unexpected side-effects in our applications (at least this is something that we were not aware of). Meaning no offense :-)

Feel free to make it a task or feature if you think that this would be more appropriate.


Updated by Alex Afanasyev over 4 years ago

  • Status changed from New to Abandoned

You may want to document it somewhere, but it is not a bug, nor it is a feature ("space blow up"). It is a side effect of the specific use case.

Also available in: Atom PDF