19991022-10:53 GMT+1
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
19991022-10:53 GMT+1 Victor Szel <info@szelvesz.hu>
|
||||
* source/vm/hvm.c
|
||||
+ //INFO now displays Clipper-like memory info.
|
||||
Just the values are higher ;)
|
||||
* source/rtl/fm.c
|
||||
include/extend.h
|
||||
+ MEMORY() functionality split into Harbour and C callable functions.
|
||||
hb_xquery()
|
||||
|
||||
19991022-10:41 GMT+1 Victor Szel <info@szelvesz.hu>
|
||||
* source/rtl/fm.c
|
||||
tests/memory.prg
|
||||
|
||||
@@ -283,6 +283,7 @@ extern void * hb_xgrab( ULONG ulSize ); /* allocates memory, e
|
||||
extern void hb_xfree( void * pMem ); /* frees memory */
|
||||
extern void * hb_xrealloc( void * pMem, ULONG ulSize ); /* reallocates memory */
|
||||
extern ULONG hb_xsize( void * pMem ); /* returns the size of an allocated memory block */
|
||||
extern ULONG hb_xquery( USHORT uiMode ); /* Query different types of memory information */
|
||||
|
||||
#if UINT_MAX == ULONG_MAX
|
||||
/* NOTE: memcpy/memset can work with ULONG data blocks */
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
* hb_xmemset()
|
||||
*
|
||||
* Copyright 1999 Victor Szel <info@szelvesz.hu>
|
||||
* hb_xquery()
|
||||
* HB_MEMORY()
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
@@ -281,9 +282,8 @@ void * hb_xmemset( void * pDestArg, int iFill, ULONG ulLen )
|
||||
|
||||
#endif
|
||||
|
||||
HARBOUR HB_MEMORY( void )
|
||||
ULONG hb_xquery( USHORT uiMode )
|
||||
{
|
||||
USHORT uiMode = hb_parni( 1 );
|
||||
ULONG ulResult;
|
||||
|
||||
/* TODO: Return the correct values instead of 9999 [vszel] */
|
||||
@@ -410,6 +410,11 @@ HARBOUR HB_MEMORY( void )
|
||||
ulResult = 0;
|
||||
}
|
||||
|
||||
hb_retnl( ulResult );
|
||||
return ulResult;
|
||||
}
|
||||
|
||||
HARBOUR HB_MEMORY( void )
|
||||
{
|
||||
hb_retnl( hb_xquery( hb_parni( 1 ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -260,9 +260,13 @@ void hb_vmInit( void )
|
||||
if( hb_cmdargCheck( "INFO" ) )
|
||||
{
|
||||
char * pszVersion = hb_version( 1 );
|
||||
char buffer[ 128 ];
|
||||
|
||||
hb_outerr( pszVersion, 0 );
|
||||
hb_outerr( hb_consoleGetNewLine(), 0 );
|
||||
sprintf( buffer, "DS avail=%luKB OS avail=%luKB EMM avail=%luKB", hb_xquery( 1 ), hb_xquery( 3 ), hb_xquery( 4 ) );
|
||||
hb_outerr( buffer, 0 );
|
||||
hb_outerr( hb_consoleGetNewLine(), 0 );
|
||||
|
||||
hb_xfree( pszVersion );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user