MCPcopy Create free account
hub / github.com/creatale/node-dv / icvInitMemStorage

Function icvInitMemStorage

deps/opencv/modules/core/src/datastructs.cpp:82–97  ·  view source on GitHub ↗

Initialize allocated storage: */

Source from the content-addressed store, hash-verified

80
81/* Initialize allocated storage: */
82static void
83icvInitMemStorage( CvMemStorage* storage, int block_size )
84{
85 if( !storage )
86 CV_Error( CV_StsNullPtr, "" );
87
88 if( block_size <= 0 )
89 block_size = CV_STORAGE_BLOCK_SIZE;
90
91 block_size = cvAlign( block_size, CV_STRUCT_ALIGN );
92 assert( sizeof(CvMemBlock) % CV_STRUCT_ALIGN == 0 );
93
94 memset( storage, 0, sizeof( *storage ));
95 storage->signature = CV_STORAGE_MAGIC_VAL;
96 storage->block_size = block_size;
97}
98
99
100/* Create root memory storage: */

Callers 1

datastructs.cppFile · 0.85

Calls 1

cvAlignFunction · 0.85

Tested by

no test coverage detected