]> sigrok.org Git - pulseview.git/commit
Make get_raw_samples() use provided mem instead of allocating
authorSoeren Apel <redacted>
Sat, 1 Jul 2017 20:24:06 +0000 (22:24 +0200)
committerUwe Hermann <redacted>
Wed, 5 Jul 2017 22:37:08 +0000 (00:37 +0200)
commitb82243f74a175f621af26aabbc0f32e2ecb125fa
tree6a9ac6e32a114baa6be2f1dac5cac75cc802b3c1
parent767bf4e705c4b977301a956cb8d0c777f7e8c8d4
Make get_raw_samples() use provided mem instead of allocating

Until now, Segment::get_raw_samples() was allocating the required
amount of memory and returned it to the caller to use. This way,
there was always enough memory allocated for the data that was
written to that memory location.

However, in SignalBase::conversion_thread_proc() we want to use
one memory location multiple times because we will create several
layers of libsigrok wrapper objects around it. This only works
if Segment::get_raw_samples() uses a given memory location instead
of allocating it by itself.
pv/data/analogsegment.cpp
pv/data/analogsegment.hpp
pv/data/decodesignal.cpp
pv/data/logicsegment.cpp
pv/data/logicsegment.hpp
pv/data/segment.cpp
pv/data/segment.hpp
pv/data/signalbase.cpp
pv/storesession.cpp
pv/views/trace/analogsignal.cpp