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

Also available in: Atom PDF