This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/_memmax.c

18 lines
378 B
C
Raw Permalink Normal View History

#include <stdio.h>
#include <malloc.h>
void main()
{
char *p;
size_t size;
size = _memmax();
printf( "Maximum memory available is %u\n", size );
_nheapgrow();
size = _memmax();
printf( "Maximum memory available is %u\n", size );
p = (char *) _nmalloc( size );
size = _memmax();
printf( "Maximum memory available is %u\n", size );
}