We recommend using Visual Studio 2017


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

errno_t _set_amblksiz(  
   size_t blockSize 

[in] blockSize

The desired size of memory blocks for memory allocation.

Zero if successful; an error code on failure.

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.


Required header



For more compatibility information, see Compatibility in the Introduction.

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