Partilhar via


_set_amblksiz

Provides a secure way to set the block size for memory allocations.

errno_t _set_amblksiz(  
   size_t blockSize 
);

Parameters

  • [in] blockSize
    The desired size of memory blocks for memory allocation.

Return Value

Zero if successful; an error code on failure.

Remarks

This function sets the value of the _amblksiz global variable, which is used by malloc and other memory allocation functions to determine the smallest block of memory that might be allocated from the heap at once. If blockSize is not a multiple of two, the actual block size is the next multiple of two.

Requirements

Routine

Required header

_set_amblksiz

<malloc.h>

For more compatibility information, see Compatibility in the Introduction.

.NET Framework Equivalent

Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.

See Also

Reference

_amblksiz

_get_amblksiz