diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 74e7b371aa2..3ee2048abe0 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -37,6 +37,8 @@ typedef void (*MSVCRT_new_handler_func)(unsigned long size); static MSVCRT_new_handler_func MSVCRT_new_handler; static int MSVCRT_new_mode; +/* FIXME - According to documentation it should be 8*1024, at runtime it returns 16 */ +static unsigned int MSVCRT_amblksiz = 16; /********************************************************************* * ??2@YAPAXI@Z (MSVCRT.@) @@ -281,3 +283,11 @@ void* MSVCRT_realloc(void* ptr, MSVCRT_size_t size) MSVCRT_free(ptr); return NULL; } + +/********************************************************************* + * __p__amblksiz (MSVCRT.@) + */ +unsigned int* __p__amblksiz(void) +{ + return &MSVCRT_amblksiz; +} diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 101b8ca9ffe..8ca03658f0a 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -107,7 +107,7 @@ @ cdecl __p___wargv() @ cdecl __p___winitenv() @ cdecl __p__acmdln() -@ stub __p__amblksiz #() +@ cdecl __p__amblksiz() @ cdecl __p__commode() @ cdecl __p__daylight() MSVCRT___p__daylight @ stub __p__dstbias #() diff --git a/include/msvcrt/malloc.h b/include/msvcrt/malloc.h index 3c1d09e2c12..1e36d16e845 100644 --- a/include/msvcrt/malloc.h +++ b/include/msvcrt/malloc.h @@ -50,6 +50,9 @@ typedef struct _heapinfo } _HEAPINFO; #endif /* _HEAPINFO_DEFINED */ +extern unsigned int* __p__amblksiz(void); +#define _amblksiz (*__p__amblksiz()); + #ifdef __cplusplus extern "C" { #endif