Actions
Support Request #18034
closedInfo for adtf::streaming:ant::ISample::WriteLock regarding internal memcpy/memset usage
Status:
Closed
Priority:
Normal
Customer:
DAIMLER
Department:
Requester's Priority:
Normal
Support Level:
2nd Level
Resolution:
Solved Issue
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 theszPreAllocateSize
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. IfszPreAllocateSize
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.
Updated by hidden over 1 year ago
- Status changed from New to In Progress
- Topic set to ADTF::SDK
Updated by hidden over 1 year ago
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 theszPreAllocateSize
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. IfszPreAllocateSize
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
Updated by hidden over 1 year ago
- Status changed from In Progress to Customer Feedback Required
Updated by hidden over 1 year ago
Hello Vimal,
do you have further questions on this topic, or can this ticket be closed?
Please give us feedback until 18.08.2022
Updated by hidden over 1 year ago
Thanks for the clarification.
The ticket can be closed.
Regards,
Vimal
Updated by hidden over 1 year ago
- 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
Actions