Support Request #18034
closed
Info for adtf::streaming:ant::ISample::WriteLock regarding internal memcpy/memset usage
Added by hidden over 1 year ago.
Updated about 1 year ago.
Requester's Priority:
Normal
Description
Supportanfrage
We would like to know more information on function adtf::streaming:ant::ISample::WriteLock
Is there memcpy/memset involved internally?
Lösung
It depends on the current state of the buffer:
- Sample has no buffer yet (i.e. first call to
WriteLock())
: If you specify a size via the szPreAllocateSize
parameter the buffer will be allocated, but left untouched otherwise.
- Sample already has a buffer: If you specify a size via the
szPreAllocateSize
the buffer will be resized to this value. If szPreAllocateSize
is bigger than the current size, a new buffer will allocated and the "old" data will be copied to the new enlarged buffer.
Basically it behaves exactly like std::vector
without the memset
in the constructor with the size parameter.
- Status changed from New to In Progress
- Topic set to ADTF::SDK
Hi,
it depends on the current state of the buffer:
- Sample has no buffer yet (i.e. first call to
WriteLock())
: If you specify a size via the szPreAllocateSize
parameter the buffer will be allocated, but left untouched otherwise.
- Sample already has a buffer: If you specify a size via the
szPreAllocateSize
the buffer will be resized to this value. If szPreAllocateSize
is bigger than the current size, a new buffer will allocated and the "old" data will be copied to the new enlarged buffer.
Basically it behaves exactly like std::vector
without the memset
in the constructor with the size parameter.
Regards,
Martin
Regards,
Martin
- Status changed from In Progress to Customer Feedback Required
Hello Vimal,
do you have further questions on this topic, or can this ticket be closed?
Please give us feedback until 18.08.2022
Thanks for the clarification.
The ticket can be closed.
Regards,
Vimal
- Project changed from 9 to Public Support
- Subject changed from Info on adtf::streaming:ant::ISample::WriteLock to Info for adtf::streaming:ant::ISample::WriteLock regarding internal memcpy/memset usage
- Description updated (diff)
- Status changed from Customer Feedback Required to To Be Closed
- Private changed from Yes to No
- Resolution set to Solved Issue
- Status changed from To Be Closed to Closed
Also available in: Atom
PDF