Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Normal
Customer:
DAIMLER
Department:
Requester's Priority:
Normal
Support Level:
2nd Level
Resolution:
Solved Issue
Product Issue Numbers:
Affected Products:
Platform:
Topic:
ADTF::SDK
FAQ Links:

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.

Actions #1

Updated by hidden over 1 year ago

  • Status changed from New to In Progress
  • Topic set to ADTF::SDK
Actions #3

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 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

Actions #4

Updated by hidden over 1 year ago

  • Status changed from In Progress to Customer Feedback Required
Actions #6

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

Actions #7

Updated by hidden over 1 year ago

Thanks for the clarification.
The ticket can be closed.

Regards,
Vimal

Actions #8

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 #10

Updated by hidden about 1 year ago

  • Status changed from To Be Closed to Closed
Actions

Also available in: Atom PDF