Reactos
at master 29 lines 724 B view raw
1// 2// debug_fill_threshold.cpp 3// 4// Copyright (c) Microsoft Corporation. All rights reserved. 5// 6// Functions to control the debug fill threshold used by the secure string 7// functions. A threshold of 0 disables filling; a threshold of SIZE_MAX 8// means to always fill to the maximum. 9// 10#include <corecrt_internal.h> 11#include <stdint.h> 12 13 14 15static size_t __acrt_debug_fill_threshold = SIZE_MAX; 16 17 18 19extern "C" size_t __cdecl _CrtSetDebugFillThreshold(size_t const new_threshold) 20{ 21 size_t const old_threshold{__acrt_debug_fill_threshold}; 22 __acrt_debug_fill_threshold = new_threshold; 23 return old_threshold; 24} 25 26extern "C" size_t __cdecl _CrtGetDebugFillThreshold() 27{ 28 return __acrt_debug_fill_threshold; 29}