Copied _heapchk(), _heapmin(), _heapset() and _heapwalk() from CRTDLL

svn path=/trunk/; revision=6992
This commit is contained in:
Jason Filby 2003-12-13 13:27:46 +00:00
parent 097d8c9998
commit 5e4291354e
2 changed files with 47 additions and 6 deletions

View file

@ -1,4 +1,4 @@
; $Id: msvcrt.def,v 1.26 2003/12/07 22:59:13 navaraf Exp $
; $Id: msvcrt.def,v 1.27 2003/12/13 13:27:46 jfilby Exp $
;
; ReactOS MSVCRT Compatibility Library
;
@ -316,12 +316,12 @@ _getw
;_getws
;_gmtime64
_global_unwind2
;_heapadd
;_heapchk
;_heapmin
;_heapset
_heapadd
_heapchk
_heapmin
_heapset
;_heapused
;_heapwalk
_heapwalk
_hypot
_i64toa
_i64tow

View file

@ -1,5 +1,6 @@
#include <windows.h>
#include <msvcrt/stdlib.h>
#include <msvcrt/malloc.h>
extern HANDLE hHeap;
@ -95,3 +96,43 @@ int MSVCRT__set_new_mode(int mode)
/* FIXME: UNLOCK_HEAP; */
return old_mode;
}
/*
* @implemented
*/
int _heapchk(void)
{
if (!HeapValidate(GetProcessHeap(), 0, NULL))
return -1;
return 0;
}
/*
* @implemented
*/
int _heapmin(void)
{
if (!HeapCompact(GetProcessHeap(), 0))
return -1;
return 0;
}
/*
* @implemented
*/
int _heapset(unsigned int unFill)
{
if (_heapchk() == -1)
return -1;
return 0;
}
/*
* @implemented
*/
int _heapwalk(struct _heapinfo* entry)
{
return 0;
}